[llvm-branch-commits] [llvm] [BOLT] Improve InsertNegateRAStatePass::inferUnknownStates (PR #163381)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Oct 31 08:20:34 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 origin/main HEAD --extensions h,cpp -- bolt/unittests/Passes/InsertNegateRAState.cpp bolt/include/bolt/Passes/InsertNegateRAStatePass.h bolt/lib/Passes/InsertNegateRAStatePass.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/bolt/unittests/Passes/InsertNegateRAState.cpp b/bolt/unittests/Passes/InsertNegateRAState.cpp
index e3864cc92..024b696eb 100644
--- a/bolt/unittests/Passes/InsertNegateRAState.cpp
+++ b/bolt/unittests/Passes/InsertNegateRAState.cpp
@@ -49,17 +49,17 @@ protected:
 #include "bolt/Core/TargetConfig.def"
   }
 
-#define PREPARE_FUNC(name)                                                    \
-  constexpr uint64_t FunctionAddress = 0x1000; \
-  BinaryFunction *BF = \
-      BC->createBinaryFunction(name, *TextSection, FunctionAddress, \
-                               /*Size=*/0, /*SymbolSize=*/0, /*Alignment=*/16); \
-  /* Make sure the pass runs on the BF.*/ \
-  BF->updateState(BinaryFunction::State::CFG); \
-  BF->setContainedNegateRAState(); \
-  /* All tests need at least one BB. */ \
-  BinaryBasicBlock *BB = BF->addBasicBlock(); \
-  BF->addEntryPoint(*BB); \
+#define PREPARE_FUNC(name)                                                     \
+  constexpr uint64_t FunctionAddress = 0x1000;                                 \
+  BinaryFunction *BF = BC->createBinaryFunction(                               \
+      name, *TextSection, FunctionAddress, /*Size=*/0, /*SymbolSize=*/0,       \
+      /*Alignment=*/16);                                                       \
+  /* Make sure the pass runs on the BF.*/                                      \
+  BF->updateState(BinaryFunction::State::CFG);                                 \
+  BF->setContainedNegateRAState();                                             \
+  /* All tests need at least one BB. */                                        \
+  BinaryBasicBlock *BB = BF->addBasicBlock();                                  \
+  BF->addEntryPoint(*BB);                                                      \
   BB->setCFIState(0);
 
   void prepareElf() {

``````````

</details>


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


More information about the llvm-branch-commits mailing list