[llvm-branch-commits] [llvm] [AsmPrinter][TargetLowering]Place a hot jump table into a hot-suffixed section (PR #122215)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jan 10 16:38:13 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 34b6b9b45564d994844cc9610edddf026a0e49cc 8d3a985df083bf766d28e089ce3f7dcab2b53b00 --extensions h,cpp -- llvm/include/llvm/CodeGen/AsmPrinter.h llvm/include/llvm/CodeGen/MachineFunction.h llvm/include/llvm/CodeGen/MachineJumpTableInfo.h llvm/include/llvm/CodeGen/Passes.h llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h llvm/include/llvm/Target/TargetLoweringObjectFile.h llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp llvm/lib/CodeGen/MachineFunction.cpp llvm/lib/CodeGen/StaticDataSplitter.cpp llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp llvm/lib/CodeGen/TargetPassConfig.cpp llvm/lib/Target/TargetLoweringObjectFile.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 208c812ac4..a0fd99387b 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -2911,12 +2911,12 @@ void AsmPrinter::emitJumpTableInfo() {
     // Retain the relative orders of original jump tables.
     for (int L = NextHotJumpTableIndex, R = JT.size() - 1; L < R; ++L, --R)
       std::swap(JumpTableIndices[L], JumpTableIndices[R]);
-  
-    emitJumpTables(
-        ArrayRef<unsigned>(JumpTableIndices)
-            .take_back(JT.size() - NextHotJumpTableIndex),
-        TLOF.getSectionForJumpTable(F, TM, &JT[JumpTableIndices[NextHotJumpTableIndex]]),
-        JTInDiffSection, *MJTI);
+
+    emitJumpTables(ArrayRef<unsigned>(JumpTableIndices)
+                       .take_back(JT.size() - NextHotJumpTableIndex),
+                   TLOF.getSectionForJumpTable(
+                       F, TM, &JT[JumpTableIndices[NextHotJumpTableIndex]]),
+                   JTInDiffSection, *MJTI);
   }
 
   return;

``````````

</details>


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


More information about the llvm-branch-commits mailing list