[llvm] [SPIRV] Add support for SPV_KHR_bit_instructions (PR #66215)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 22 02:50:50 PDT 2023
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 65341b09b0d54ce5318e26a63b84138695d2ac35 980252c159d722860f5914461ada5099b2f4a10e -- llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.h llvm/lib/Target/SPIRV/SPIRVSubtarget.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp b/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
index 03891f4c815e..66deb6fe42fc 100644
--- a/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
@@ -525,8 +525,9 @@ void SPIRV::RequirementHandler::addAvailableCaps(const CapabilityList &ToAdd) {
SPIRV::OperandCategory::CapabilityOperand, Cap));
}
-void SPIRV::RequirementHandler::removeCapabilityIf(const Capability::Capability ToRemove,
- const Capability::Capability IfPresent) {
+void SPIRV::RequirementHandler::removeCapabilityIf(
+ const Capability::Capability ToRemove,
+ const Capability::Capability IfPresent) {
if (AvailableCaps.contains(IfPresent))
AvailableCaps.erase(ToRemove);
}
@@ -909,7 +910,8 @@ void addInstrRequirements(const MachineInstr &MI,
// If we require capability Shader, then we can remove the requirement for
// the BitInstructions capability, since Shader is a superset capability
// of BitInstructions.
- Reqs.removeCapabilityIf(SPIRV::Capability::BitInstructions, SPIRV::Capability::Shader);
+ Reqs.removeCapabilityIf(SPIRV::Capability::BitInstructions,
+ SPIRV::Capability::Shader);
}
static void collectReqs(const Module &M, SPIRV::ModuleAnalysisInfo &MAI,
``````````
</details>
https://github.com/llvm/llvm-project/pull/66215
More information about the llvm-commits
mailing list