aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
diff options
context:
space:
mode:
authorDmitry Sidorov <dmitry.sidorov@intel.com>2025-03-06 19:44:21 +0100
committerGitHub <noreply@github.com>2025-03-06 19:44:21 +0100
commit7a44ff13d97475f0de38c8799dec86be0d0de0ac (patch)
treecfacff7d3b434fd10f6de2f45240378c0f867e1d /llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
parent0ce4b685d2f46b389887aeb8d1d16d5d15f7ecce (diff)
downloadllvm-7a44ff13d97475f0de38c8799dec86be0d0de0ac.zip
llvm-7a44ff13d97475f0de38c8799dec86be0d0de0ac.tar.gz
llvm-7a44ff13d97475f0de38c8799dec86be0d0de0ac.tar.bz2
[SPIR-V] Add SPV_INTEL_memory_access_aliasing extension (#129800)
Spec can be found here https://github.com/intel/llvm/pull/15225 TODO for future patches: - During spec review need to decide whether only FunctionCall or Atomic instructions can be decorated and if not - move the code around adding handling for other instructions; - Handle optional string metadata; - Handle LLVM atomic instructions; - Handle SPIR-V friendly atomic calls returning via sret argument. Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Diffstat (limited to 'llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp')
-rw-r--r--llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp b/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
index 32f8178..e0b348f 100644
--- a/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
@@ -566,6 +566,8 @@ void SPIRVModuleAnalysis::processOtherInstrs(const Module &M) {
collectOtherInstr(MI, MAI, SPIRV::MB_DebugNames, IS);
} else if (OpCode == SPIRV::OpEntryPoint) {
collectOtherInstr(MI, MAI, SPIRV::MB_EntryPoints, IS);
+ } else if (TII->isAliasingInstr(MI)) {
+ collectOtherInstr(MI, MAI, SPIRV::MB_AliasingInsts, IS);
} else if (TII->isDecorationInstr(MI)) {
collectOtherInstr(MI, MAI, SPIRV::MB_Annotations, IS);
collectFuncNames(MI, &*F);
@@ -1251,6 +1253,13 @@ void addInstrRequirements(const MachineInstr &MI,
}
break;
}
+ case SPIRV::OpAliasDomainDeclINTEL:
+ case SPIRV::OpAliasScopeDeclINTEL:
+ case SPIRV::OpAliasScopeListDeclINTEL: {
+ Reqs.addExtension(SPIRV::Extension::SPV_INTEL_memory_access_aliasing);
+ Reqs.addCapability(SPIRV::Capability::MemoryAccessAliasingINTEL);
+ break;
+ }
case SPIRV::OpBitReverse:
case SPIRV::OpBitFieldInsert:
case SPIRV::OpBitFieldSExtract: