[llvm] [SPIR-V] Introduce support of llvm.ptr.annotation to SPIR-V Backend and implement extensions which make use of spirv.Decorations (PR #93479)
via llvm-commits
llvm-commits at lists.llvm.org
Tue May 28 03:41:55 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 12271710da72a11d3cccc958a2824fe269363c34 ea7239ada0142869f3dd3f38fd89ebc781e525c0 -- llvm/lib/Target/SPIRV/MCTargetDesc/SPIRVInstPrinter.cpp llvm/lib/Target/SPIRV/SPIRVCommandLine.cpp llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp llvm/lib/Target/SPIRV/SPIRVPrepareFunctions.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/SPIRV/SPIRVCommandLine.cpp b/llvm/lib/Target/SPIRV/SPIRVCommandLine.cpp
index 4422e9b5dd..75aa1823b1 100644
--- a/llvm/lib/Target/SPIRV/SPIRVCommandLine.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVCommandLine.cpp
@@ -33,7 +33,8 @@ static const std::map<std::string, SPIRV::Extension::Extension>
{"SPV_INTEL_cache_controls",
SPIRV::Extension::Extension::SPV_INTEL_cache_controls},
{"SPV_INTEL_global_variable_fpga_decorations",
- SPIRV::Extension::Extension::SPV_INTEL_global_variable_fpga_decorations},
+ SPIRV::Extension::Extension::
+ SPV_INTEL_global_variable_fpga_decorations},
{"SPV_INTEL_global_variable_host_access",
SPIRV::Extension::Extension::SPV_INTEL_global_variable_host_access},
{"SPV_INTEL_optnone", SPIRV::Extension::Extension::SPV_INTEL_optnone},
diff --git a/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp b/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
index b4b3e1f792..61f99f8d85 100644
--- a/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
@@ -703,12 +703,15 @@ static void addOpDecorateReqs(const MachineInstr &MI, unsigned DecIndex,
static_cast<SPIRV::LinkageType::LinkageType>(LinkageOp);
if (LnkType == SPIRV::LinkageType::LinkOnceODR)
Reqs.addExtension(SPIRV::Extension::SPV_KHR_linkonce_odr);
- } else if (Dec == SPIRV::Decoration::CacheControlLoadINTEL || Dec == SPIRV::Decoration::CacheControlStoreINTEL) {
- Reqs.addExtension(SPIRV::Extension::SPV_INTEL_cache_controls);
+ } else if (Dec == SPIRV::Decoration::CacheControlLoadINTEL ||
+ Dec == SPIRV::Decoration::CacheControlStoreINTEL) {
+ Reqs.addExtension(SPIRV::Extension::SPV_INTEL_cache_controls);
} else if (Dec == SPIRV::Decoration::HostAccessINTEL) {
- Reqs.addExtension(SPIRV::Extension::SPV_INTEL_global_variable_host_access);
- } else if (Dec == SPIRV::Decoration::InitModeINTEL || Dec == SPIRV::Decoration::ImplementInRegisterMapINTEL) {
- Reqs.addExtension(SPIRV::Extension::SPV_INTEL_global_variable_fpga_decorations);
+ Reqs.addExtension(SPIRV::Extension::SPV_INTEL_global_variable_host_access);
+ } else if (Dec == SPIRV::Decoration::InitModeINTEL ||
+ Dec == SPIRV::Decoration::ImplementInRegisterMapINTEL) {
+ Reqs.addExtension(
+ SPIRV::Extension::SPV_INTEL_global_variable_fpga_decorations);
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/93479
More information about the llvm-commits
mailing list