[llvm] [SPIRV] Add Lifetime intrinsics/instructions (PR #85391)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 15 05:57:04 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 afec257d369a13893b39d02bc630f9f3cec80162 0db35c6a380e38607ad30c5733666bfce121377a -- llvm/lib/MC/SPIRVObjectWriter.cpp llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.h llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp llvm/lib/Target/SPIRV/SPIRVMCInstLower.cpp llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.h llvm/lib/Target/SPIRV/SPIRVPrepareFunctions.cpp llvm/lib/Target/SPIRV/SPIRVSubtarget.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.h b/llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.h
index 028b5df31e..da480b22a5 100644
--- a/llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.h
+++ b/llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.h
@@ -111,12 +111,8 @@ public:
DT.buildDepsGraph(Graph, MMI);
}
- void setBound(unsigned V) {
- Bound = V;
- }
- unsigned getBound() {
- return Bound;
- }
+ void setBound(unsigned V) { Bound = V; }
+ unsigned getBound() { return Bound; }
// Map a machine operand that represents a use of a function via function
// pointer to a machine operand that represents the function definition.
diff --git a/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp b/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
index 08e55d1027..0fef19c2d5 100644
--- a/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
@@ -1672,9 +1672,7 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg,
bool IsNonvoidPtr = PonteeOpType != 0 && PonteeOpType != SPIRV::OpTypeVoid;
if (Size == -1 || IsNonvoidPtr)
Size = 0;
- BuildMI(BB, I, I.getDebugLoc(), TII.get(Op))
- .addUse(PtrReg)
- .addImm(Size);
+ BuildMI(BB, I, I.getDebugLoc(), TII.get(Op)).addUse(PtrReg).addImm(Size);
} break;
default: {
std::string DiagMsg;
``````````
</details>
https://github.com/llvm/llvm-project/pull/85391
More information about the llvm-commits
mailing list