[llvm] [BOLT] Do not use HLT as split point when build the CFG (PR #150963)

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 15 00:30:14 PDT 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 HEAD~1 HEAD --extensions cpp,h -- bolt/include/bolt/Core/MCPlusBuilder.h bolt/lib/Core/MCPlusBuilder.cpp bolt/lib/Target/X86/X86MCPlusBuilder.cpp
``````````

</details>

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

``````````diff
diff --git a/bolt/include/bolt/Core/MCPlusBuilder.h b/bolt/include/bolt/Core/MCPlusBuilder.h
index ac9e8e729..e773250ce 100644
--- a/bolt/include/bolt/Core/MCPlusBuilder.h
+++ b/bolt/include/bolt/Core/MCPlusBuilder.h
@@ -740,7 +740,8 @@ public:
     return false;
   }
 
-  /// Return true if the hlt instruction under the x86, otherwise, default to false.
+  /// Return true if the hlt instruction under the x86, otherwise, default to
+  /// false.
   virtual bool isX86HLT(const MCInst &Inst) const { return false; }
 
   /// Return the width, in bytes, of the memory access performed by \p Inst, if
diff --git a/bolt/lib/Core/MCPlusBuilder.cpp b/bolt/lib/Core/MCPlusBuilder.cpp
index 6740190e6..d8a2ac6f6 100644
--- a/bolt/lib/Core/MCPlusBuilder.cpp
+++ b/bolt/lib/Core/MCPlusBuilder.cpp
@@ -133,8 +133,9 @@ bool MCPlusBuilder::equals(const MCSpecifierExpr &A, const MCSpecifierExpr &B,
 
 bool MCPlusBuilder::isTerminator(const MCInst &Inst) const {
   return (opts::TerminalTrap && Info->get(Inst.getOpcode()).isTrap()) ||
-         Analysis->isTerminator(Inst) ? !isX86HLT(Inst)
-                                      : false;
+                 Analysis->isTerminator(Inst)
+             ? !isX86HLT(Inst)
+             : false;
 }
 
 void MCPlusBuilder::setTailCall(MCInst &Inst) const {

``````````

</details>


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


More information about the llvm-commits mailing list