diff --git a/include/LLVMSPIRVExtensions.inc b/include/LLVMSPIRVExtensions.inc index f578e64ee3..b86791922d 100644 --- a/include/LLVMSPIRVExtensions.inc +++ b/include/LLVMSPIRVExtensions.inc @@ -35,7 +35,7 @@ EXT(SPV_INTEL_arbitrary_precision_integers) EXT(SPV_INTEL_optimization_hints) EXT(SPV_INTEL_float_controls2) EXT(SPV_INTEL_vector_compute) -EXT(SPV_INTEL_fast_composite) +EXT(SPV_INTEL_fast_composite) // TODO: to remove EXT(SPV_INTEL_usm_storage_classes) EXT(SPV_INTEL_fpga_buffer_location) EXT(SPV_INTEL_arbitrary_precision_fixed_point) diff --git a/lib/SPIRV/PreprocessMetadata.cpp b/lib/SPIRV/PreprocessMetadata.cpp index 11af50b0a8..6b8741dc52 100644 --- a/lib/SPIRV/PreprocessMetadata.cpp +++ b/lib/SPIRV/PreprocessMetadata.cpp @@ -359,12 +359,6 @@ void PreprocessMetadataBase::preprocessVectorComputeMetadata(Module *M, .add(SLMSize) .done(); } - if (Attrs.hasFnAttr(kVCMetadata::VCFCEntry)) { - EM.addOp() - .add(&F) - .add(spv::internal::ExecutionModeFastCompositeKernelINTEL) - .done(); - } if (Attrs.hasFnAttr(kVCMetadata::VCNamedBarrierCount)) { SPIRVWord NBarrierCnt = 0; diff --git a/lib/SPIRV/SPIRVReader.cpp b/lib/SPIRV/SPIRVReader.cpp index 0378ed07eb..04d6c2db67 100644 --- a/lib/SPIRV/SPIRVReader.cpp +++ b/lib/SPIRV/SPIRVReader.cpp @@ -4643,12 +4643,6 @@ bool SPIRVToLLVM::transMetadata() { if (BM->getDesiredBIsRepresentation() == BIsRepresentation::SPIRVFriendlyIR) transFunctionDecorationsToMetadata(BF, F); - if (BF->hasDecorate(internal::DecorationCallableFunctionINTEL)) - F->addFnAttr(kVCMetadata::VCCallable); - if (isKernel(BF) && - BF->getExecutionMode(internal::ExecutionModeFastCompositeKernelINTEL)) - F->addFnAttr(kVCMetadata::VCFCEntry); - if (F->getCallingConv() != CallingConv::SPIR_KERNEL) continue; diff --git a/lib/SPIRV/SPIRVWriter.cpp b/lib/SPIRV/SPIRVWriter.cpp index 3f8c1fadd8..81b0796fdc 100644 --- a/lib/SPIRV/SPIRVWriter.cpp +++ b/lib/SPIRV/SPIRVWriter.cpp @@ -1020,11 +1020,6 @@ SPIRVFunction *LLVMToSPIRVBase::transFunctionDecl(Function *F) { BF->addDecorate(DecorationReferencedIndirectlyINTEL); } - if (Attrs.hasFnAttr(kVCMetadata::VCCallable) && - BM->isAllowedToUseExtension(ExtensionID::SPV_INTEL_fast_composite)) { - BF->addDecorate(internal::DecorationCallableFunctionINTEL); - } - if (BM->isAllowedToUseExtension(ExtensionID::SPV_INTEL_vector_compute)) transVectorComputeMetadata(F); @@ -6282,11 +6277,6 @@ bool LLVMToSPIRVBase::transExecutionMode() { break; AddSingleArgExecutionMode(static_cast(EMode)); } break; - case spv::internal::ExecutionModeFastCompositeKernelINTEL: { - if (BM->isAllowedToUseExtension(ExtensionID::SPV_INTEL_fast_composite)) - BF->addExecutionMode(BM->add(new SPIRVExecutionMode( - OpExecutionMode, BF, static_cast(EMode)))); - } break; case spv::internal::ExecutionModeNamedSubgroupSizeINTEL: { if (!BM->isAllowedToUseExtension( ExtensionID::SPV_INTEL_subgroup_requirements)) diff --git a/lib/SPIRV/libSPIRV/SPIRVDecorate.h b/lib/SPIRV/libSPIRV/SPIRVDecorate.h index 2b498dd49b..e450f8d452 100644 --- a/lib/SPIRV/libSPIRV/SPIRVDecorate.h +++ b/lib/SPIRV/libSPIRV/SPIRVDecorate.h @@ -183,8 +183,6 @@ class SPIRVDecorate : public SPIRVDecorateGeneric { return ExtensionID::SPV_INTEL_fpga_cluster_attributes; case DecorationFuseLoopsInFunctionINTEL: return ExtensionID::SPV_INTEL_loop_fuse; - case internal::DecorationCallableFunctionINTEL: - return ExtensionID::SPV_INTEL_fast_composite; case DecorationMathOpDSPModeINTEL: return ExtensionID::SPV_INTEL_fpga_dsp_control; case DecorationInitiationIntervalINTEL: diff --git a/lib/SPIRV/libSPIRV/SPIRVEntry.h b/lib/SPIRV/libSPIRV/SPIRVEntry.h index c649c39b2b..97758e74f5 100644 --- a/lib/SPIRV/libSPIRV/SPIRVEntry.h +++ b/lib/SPIRV/libSPIRV/SPIRVEntry.h @@ -909,8 +909,6 @@ class SPIRVCapability : public SPIRVEntryNoId { case CapabilityVectorComputeINTEL: case CapabilityVectorAnyINTEL: return ExtensionID::SPV_INTEL_vector_compute; - case internal::CapabilityFastCompositeINTEL: - return ExtensionID::SPV_INTEL_fast_composite; case internal::CapabilitySubgroupRequirementsINTEL: return ExtensionID::SPV_INTEL_subgroup_requirements; case CapabilityFPFastMathModeINTEL: diff --git a/lib/SPIRV/libSPIRV/SPIRVEnum.h b/lib/SPIRV/libSPIRV/SPIRVEnum.h index c4ba56cecf..0e0ca816c1 100644 --- a/lib/SPIRV/libSPIRV/SPIRVEnum.h +++ b/lib/SPIRV/libSPIRV/SPIRVEnum.h @@ -290,8 +290,6 @@ template <> inline void SPIRVMap::init() { {CapabilityFloatingPointModeINTEL}); ADD_VEC_INIT(ExecutionModeSharedLocalMemorySizeINTEL, {CapabilityVectorComputeINTEL}); - ADD_VEC_INIT(internal::ExecutionModeFastCompositeKernelINTEL, - {internal::CapabilityFastCompositeINTEL}); ADD_VEC_INIT(ExecutionModeRegisterMapInterfaceINTEL, {CapabilityFPGAKernelAttributesv2INTEL}); ADD_VEC_INIT(ExecutionModeStreamingInterfaceINTEL, @@ -473,8 +471,6 @@ template <> inline void SPIRVMap::init() { ADD_VEC_INIT(DecorationAliasScopeINTEL, {CapabilityMemoryAccessAliasingINTEL}); ADD_VEC_INIT(DecorationNoAliasINTEL, {CapabilityMemoryAccessAliasingINTEL}); - ADD_VEC_INIT(internal::DecorationCallableFunctionINTEL, - {internal::CapabilityFastCompositeINTEL}); ADD_VEC_INIT(DecorationMediaBlockIOINTEL, {CapabilityVectorComputeINTEL}); ADD_VEC_INIT(DecorationStallEnableINTEL, {CapabilityFPGAClusterAttributesINTEL}); diff --git a/lib/SPIRV/libSPIRV/SPIRVNameMapEnum.h b/lib/SPIRV/libSPIRV/SPIRVNameMapEnum.h index a6fc1490b9..dfe2c0e555 100644 --- a/lib/SPIRV/libSPIRV/SPIRVNameMapEnum.h +++ b/lib/SPIRV/libSPIRV/SPIRVNameMapEnum.h @@ -212,7 +212,6 @@ template <> inline void SPIRVMap::init() { add(DecorationCacheControlStoreINTEL, "CacheControlStoreINTEL"); // From spirv_internal.hpp - add(internal::DecorationCallableFunctionINTEL, "CallableFunctionINTEL"); add(internal::DecorationRuntimeAlignedINTEL, "RuntimeAlignedINTEL"); add(internal::DecorationHostAccessINTEL, "HostAccessINTEL"); add(internal::DecorationInitModeINTEL, "InitModeINTEL"); @@ -653,7 +652,6 @@ template <> inline void SPIRVMap::init() { "SubgroupMatrixMultiplyAccumulateINTEL"); add(CapabilityTernaryBitwiseFunctionINTEL, "TernaryBitwiseFunctionINTEL"); // From spirv_internal.hpp - add(internal::CapabilityFastCompositeINTEL, "FastCompositeINTEL"); add(internal::CapabilityTokenTypeINTEL, "TokenTypeINTEL"); add(internal::CapabilityJointMatrixINTEL, "JointMatrixINTEL"); add(internal::CapabilityHWThreadQueryINTEL, "HWThreadQueryINTEL"); diff --git a/lib/SPIRV/libSPIRV/spirv_internal.hpp b/lib/SPIRV/libSPIRV/spirv_internal.hpp index c0d162da85..33d79e2959 100644 --- a/lib/SPIRV/libSPIRV/spirv_internal.hpp +++ b/lib/SPIRV/libSPIRV/spirv_internal.hpp @@ -100,7 +100,6 @@ enum InternalDecoration { }; enum InternalCapability { - ICapFastCompositeINTEL = 6093, ICapTokenTypeINTEL = 6112, ICapabilityJointMatrixINTEL = 6118, ICapabilityHWThreadQueryINTEL = 6134, @@ -121,7 +120,6 @@ enum InternalCapability { }; enum InternalExecutionMode { - IExecModeFastCompositeKernelINTEL = 6088, IExecModeNamedSubgroupSizeINTEL = 6446, }; @@ -250,8 +248,6 @@ constexpr SourceLanguage SourceLanguageCPP20 = constexpr Op OpForward = static_cast(IOpForward); constexpr Op OpTypeTokenINTEL = static_cast(IOpTypeTokenINTEL); -constexpr Decoration DecorationCallableFunctionINTEL = - static_cast(IDecCallableFunctionINTEL); constexpr Decoration DecorationRuntimeAlignedINTEL = static_cast(IDecRuntimeAlignedINTEL); constexpr Decoration DecorationHostAccessINTEL = @@ -263,16 +259,11 @@ constexpr Decoration DecorationImplementInCSRINTEL = constexpr Decoration DecorationArgumentAttributeINTEL = static_cast(IDecArgumentAttributeINTEL); -constexpr Capability CapabilityFastCompositeINTEL = - static_cast(ICapFastCompositeINTEL); constexpr Capability CapabilityTokenTypeINTEL = static_cast(ICapTokenTypeINTEL); constexpr Capability CapabilityGlobalVariableDecorationsINTEL = static_cast(ICapGlobalVariableDecorationsINTEL); -constexpr ExecutionMode ExecutionModeFastCompositeKernelINTEL = - static_cast(IExecModeFastCompositeKernelINTEL); - constexpr ExecutionMode ExecutionModeNamedSubgroupSizeINTEL = static_cast(IExecModeNamedSubgroupSizeINTEL); diff --git a/test/extensions/INTEL/SPV_INTEL_fast_composite/callable-attribute-decoration.ll b/test/extensions/INTEL/SPV_INTEL_fast_composite/callable-attribute-decoration.ll deleted file mode 100644 index 3dc36681c2..0000000000 --- a/test/extensions/INTEL/SPV_INTEL_fast_composite/callable-attribute-decoration.ll +++ /dev/null @@ -1,19 +0,0 @@ -; RUN: llvm-as %s -o %t.bc -; RUN: llvm-spirv %t.bc -o %t.spv --spirv-ext=+SPV_INTEL_fast_composite -; RUN: llvm-spirv %t.spv -o %t.spt --to-text -; RUN: FileCheck < %t.spt %s --check-prefix=CHECK-SPIRV -; RUN: llvm-spirv %t.spv -o %t.bc -r -; RUN: llvm-dis %t.bc -o %t.ll -; RUN: FileCheck < %t.ll %s --check-prefix=CHECK-LLVM -target triple = "spir64" - - -define dso_local <4 x i32> @foo(<4 x i32> %a, <4 x i32> %b) #0 { -entry: - ret <4 x i32> %a -} -; CHECK-SPIRV: 3 Decorate {{[0-9]+}} CallableFunctionINTEL -; CHECK-LLVM: attributes -; CHECK-LLVM-SAME: "VCCallable" - -attributes #0 = { "VCCallable" "VCFunction" } diff --git a/test/extensions/INTEL/SPV_INTEL_fast_composite/fast-composit-entry.ll b/test/extensions/INTEL/SPV_INTEL_fast_composite/fast-composit-entry.ll deleted file mode 100644 index 150dc1d45e..0000000000 --- a/test/extensions/INTEL/SPV_INTEL_fast_composite/fast-composit-entry.ll +++ /dev/null @@ -1,40 +0,0 @@ -; RUN: llvm-as %s -o %t.bc -; RUN: llvm-spirv %t.bc -o %t.spv --spirv-ext=+SPV_INTEL_fast_composite -; RUN: llvm-spirv %t.spv -o %t.spt --to-text -; RUN: FileCheck < %t.spt %s --check-prefix=CHECK-SPIRV -; RUN: llvm-spirv %t.spv -o %t.bc -r -; RUN: llvm-dis %t.bc -o %t.ll -; RUN: FileCheck < %t.ll %s --check-prefix=CHECK-LLVM - -target triple = "spir64-unknown-unknown" - - -; CHECK-SPIRV: {{[0-9]+}} EntryPoint {{[0-9]+}} [[#FOO_ID:]] "foo" -; CHECK-SPIRV: {{[0-9]+}} EntryPoint {{[0-9]+}} [[#BAR_ID:]] "bar" -; CHECK-SPIRV: 3 ExecutionMode [[#FOO_ID]] 6088 -; CHECK-SPIRV-NOT: 3 ExecutionMode [[#BAR_ID]] 6088 - -; CHECK-LLVM: define spir_kernel void @foo -; CHECK-LLVM-SAME: #[[#FOO_ATTR_ID:]] -; CHECK-LLVM: define spir_kernel void @bar -; CHECK-LLVM-SAME: #[[#BAR_ATTR_ID:]] - -; CHECK-LLVM: attributes #[[#FOO_ATTR_ID]] -; CHECK-LLVM-SAME: "VCFCEntry" -; CHECK-LLVM: attributes #[[#BAR_ATTR_ID]] -; CHECK-LLVM-NOT: "VCFCEntry" - - -define spir_kernel void @foo(<4 x i32> %a, <4 x i32> %b) #0 { -entry: - ret void -} - -define spir_kernel void @bar(<4 x i32> %a, <4 x i32> %b) #1 { -entry: - ret void -} - -attributes #0 = { noinline nounwind "VCFCEntry" "VCFloatControl"="0" "VCFunction" } -attributes #1 = { noinline nounwind "VCFloatControl"="48" "VCFunction" } -