Skip to content

Commit 855eb27

Browse files
vmaksimoMrSidims
authored andcommitted
Deprecate SPV_INTEL_non_constant_addrspace_printf extension (#1818)
This change continues #1749. We are removing SPV_INTEL_non_constant_addrspace_printf extension in favor of SPV_EXT_relaxed_printf_string_address_space, which are basically the same. Signed-off-by: Maksimova, Viktoria <viktoria.maksimova@intel.com>
1 parent 959c79a commit 855eb27

File tree

6 files changed

+9
-112
lines changed

6 files changed

+9
-112
lines changed

include/LLVMSPIRVExtensions.inc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ EXT(SPV_INTEL_bfloat16_conversion)
5151
EXT(SPV_INTEL_joint_matrix)
5252
EXT(SPV_INTEL_hw_thread_queries)
5353
EXT(SPV_INTEL_global_variable_decorations)
54-
EXT(SPV_INTEL_non_constant_addrspace_printf)
5554
EXT(SPV_INTEL_complex_float_mul_div)
5655
EXT(SPV_INTEL_split_barrier)
5756
EXT(SPV_INTEL_tensor_float32_conversion)

lib/SPIRV/SPIRVWriter.cpp

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4025,26 +4025,18 @@ SPIRVValue *LLVMToSPIRVBase::transDirectCallInst(CallInst *CI,
40254025
auto *FormatStrPtr = cast<PointerType>(CI->getArgOperand(0)->getType());
40264026
if (FormatStrPtr->getAddressSpace() !=
40274027
SPIR::TypeAttributeEnum::ATTR_CONST) {
4028-
if (BM->isAllowedToUseExtension(
4028+
if (!BM->isAllowedToUseExtension(
40294029
ExtensionID::SPV_EXT_relaxed_printf_string_address_space)) {
4030-
BM->addExtension(
4031-
ExtensionID::SPV_EXT_relaxed_printf_string_address_space);
4032-
} else if (BM->isAllowedToUseExtension(
4033-
ExtensionID::SPV_INTEL_non_constant_addrspace_printf)) {
4034-
BM->addExtension(
4035-
ExtensionID::SPV_INTEL_non_constant_addrspace_printf);
4036-
BM->addCapability(
4037-
internal::CapabilityNonConstantAddrspacePrintfINTEL);
4038-
} else {
40394030
std::string ErrorStr =
4040-
"Either SPV_EXT_relaxed_printf_string_address_space or "
4041-
"SPV_INTEL_non_constant_addrspace_printf extension should be "
4042-
"allowed to translate this module, because this LLVM module "
4043-
"contains the printf function with format string, whose address "
4044-
"space is not equal to 2 (constant).";
4031+
"Either SPV_EXT_relaxed_printf_string_address_space extension "
4032+
"should be allowed to translate this module, because this LLVM "
4033+
"module contains the printf function with format string, whose "
4034+
"address space is not equal to 2 (constant).";
40454035
getErrorLog().checkError(false, SPIRVEC_RequiresExtension, CI,
40464036
ErrorStr);
40474037
}
4038+
BM->addExtension(
4039+
ExtensionID::SPV_EXT_relaxed_printf_string_address_space);
40484040
}
40494041
}
40504042

lib/SPIRV/libSPIRV/SPIRVNameMapEnum.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,8 +614,6 @@ template <> inline void SPIRVMap<Capability, std::string>::init() {
614614
add(internal::CapabilityHWThreadQueryINTEL, "HWThreadQueryINTEL");
615615
add(internal::CapabilityGlobalVariableDecorationsINTEL,
616616
"GlobalVariableDecorationsINTEL");
617-
add(internal::CapabilityNonConstantAddrspacePrintfINTEL,
618-
"NonConstantAddrspacePrintfINTEL");
619617
add(internal::CapabilityComplexFloatMulDivINTEL, "ComplexFloatMulDivINTEL");
620618
add(internal::CapabilityTensorFloat32ConversionINTEL,
621619
"TensorFloat32ConversionINTEL");

lib/SPIRV/libSPIRV/spirv_internal.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ enum InternalCapability {
7878
ICapabilityHWThreadQueryINTEL = 6134,
7979
ICapFPArithmeticFenceINTEL = 6144,
8080
ICapGlobalVariableDecorationsINTEL = 6146,
81-
ICapabilityNonConstantAddrspacePrintfINTEL = 6411,
8281
ICapabilityComplexFloatMulDivINTEL = 6414,
8382
ICapabilityTensorFloat32ConversionINTEL = 6425,
8483
ICapabilityMaskedGatherScatterINTEL = 6427
@@ -121,8 +120,6 @@ _SPIRV_OP(Capability, HWThreadQueryINTEL)
121120
_SPIRV_OP(BuiltIn, SubDeviceIDINTEL)
122121
_SPIRV_OP(BuiltIn, GlobalHWThreadIDINTEL)
123122

124-
_SPIRV_OP(Capability, NonConstantAddrspacePrintfINTEL)
125-
126123
_SPIRV_OP(Capability, ComplexFloatMulDivINTEL)
127124
_SPIRV_OP(Op, ComplexFMulINTEL)
128125
_SPIRV_OP(Op, ComplexFDivINTEL)

test/extensions/EXT/SPV_EXT_relaxed_printf_string_address_space/non-constant-printf.ll renamed to test/transcoding/SPV_EXT_relaxed_printf_string_address_space/non-constant-printf.ll

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; RUN: llvm-as %s -o %t.bc
22
; RUN: not llvm-spirv %t.bc -o %t.spv 2>&1 | FileCheck %s --check-prefix=CHECK-WO-EXT
33

4-
; RUN: llvm-spirv -spirv-text %t.bc -o %t.spt --spirv-ext=+SPV_EXT_relaxed_printf_string_address_space,+SPV_INTEL_non_constant_addrspace_printf
4+
; RUN: llvm-spirv -spirv-text %t.bc -o %t.spt --spirv-ext=+SPV_EXT_relaxed_printf_string_address_space
55
; RUN: FileCheck < %t.spt %s --check-prefix=CHECK-SPIRV
66

77
; RUN: llvm-spirv -to-binary %t.spt -o %t.spv
@@ -10,10 +10,8 @@
1010
; RUN: FileCheck < %t.rev.ll %s --check-prefix=CHECK-LLVM
1111

1212
; CHECK-WO-EXT: RequiresExtension: Feature requires the following SPIR-V extension:
13-
; CHECK-WO-EXT: Either SPV_EXT_relaxed_printf_string_address_space or SPV_INTEL_non_constant_addrspace_printf extension should be allowed to translate this module, because this LLVM module contains the printf function with format string, whose address space is not equal to 2 (constant).
13+
; CHECK-WO-EXT: SPV_EXT_relaxed_printf_string_address_space extension should be allowed to translate this module, because this LLVM module contains the printf function with format string, whose address space is not equal to 2 (constant).
1414

15-
; CHECK-SPIRV-NOT: Capability NonConstantAddrspacePrintfINTEL
16-
; CHECK-SPIRV-NOT: Extension "SPV_INTEL_non_constant_addrspace_printf"
1715
; CHECK-SPIRV: Extension "SPV_EXT_relaxed_printf_string_address_space"
1816
; CHECK-SPIRV: ExtInstImport [[#ExtInstSetId:]] "OpenCL.std"
1917
; CHECK-SPIRV: TypeInt [[#TypeInt8Id:]] 8 0

test/transcoding/SPV_INTEL_non_constant_addrspace_printf/non-constant-printf.ll

Lines changed: 0 additions & 87 deletions
This file was deleted.

0 commit comments

Comments
 (0)