[llvm] [SPIR-V] Ensure that cleaning of temporary constants doesn't purge tracked constants (PR #95303)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 12 13:30:19 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 7b8038426c52d5fee9c2f4cfe3e747e3a2b8efec da30d725b5324dedc64a034b4eda2e6ad10fe273 -- llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp b/llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
index d899dde3d1..2e0cff7936 100644
--- a/llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
@@ -123,8 +123,9 @@ addConstantsToTrack(MachineFunction &MF, SPIRVGlobalRegistry *GR,
     MI->eraseFromParent();
 }
 
-static void foldConstantsIntoIntrinsics(MachineFunction &MF,
-                                        SmallSet<Register, 4> &TrackedConstRegs) {
+static void
+foldConstantsIntoIntrinsics(MachineFunction &MF,
+                            SmallSet<Register, 4> &TrackedConstRegs) {
   SmallVector<MachineInstr *, 10> ToErase;
   MachineRegisterInfo &MRI = MF.getRegInfo();
   const unsigned AssignNameOperandShift = 2;

``````````

</details>


https://github.com/llvm/llvm-project/pull/95303


More information about the llvm-commits mailing list