[llvm] [AMDGPU][CodeGen] LocalStackSlotAllocation: record per-instr FI offsets (PR #166979)

via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 27 07:12:29 PST 2025


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 origin/main HEAD --extensions cpp -- llvm/lib/CodeGen/LocalStackSlotAllocation.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp b/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
index 44b1532fc..3f3eb1968 100644
--- a/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
+++ b/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
@@ -68,7 +68,7 @@ namespace {
     bool operator<(const FrameRef &RHS) const {
       return std::tuple(LocalOffset + InstOffset, FrameIdx, Order) <
              std::tuple(RHS.LocalOffset + RHS.InstOffset, RHS.FrameIdx,
-                             RHS.Order);
+                        RHS.Order);
     }
 
     MachineBasicBlock::iterator getMachineInstr() const { return MI; }
@@ -352,8 +352,8 @@ bool LocalStackSlotImpl::insertFrameReferenceRegisters(MachineFunction &Fn) {
             break;
           int64_t InstOffset =
               TRI->getFrameIndexInstrOffset(&MI, MO.getOperandNo());
-          FrameReferenceInsns.emplace_back(
-              &MI, LocalOffset, Idx, InstOffset, Order++);
+          FrameReferenceInsns.emplace_back(&MI, LocalOffset, Idx, InstOffset,
+                                           Order++);
           break;
         }
       }

``````````

</details>


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


More information about the llvm-commits mailing list