[llvm] [CodeMoverUtils] Enhance CodeMoverUtils to sink an entire BB (PR #87857)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 6 21:33:25 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 e915b7d8166a870834868bcf7de85cb5e96a08ec 3924918eb7ef1068f07cf8bdb0efff529d041046 -- llvm/lib/Transforms/Utils/CodeMoverUtils.cpp llvm/unittests/Transforms/Utils/CodeMoverUtilsTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Utils/CodeMoverUtils.cpp b/llvm/lib/Transforms/Utils/CodeMoverUtils.cpp
index 1db63c9a19..784375919a 100644
--- a/llvm/lib/Transforms/Utils/CodeMoverUtils.cpp
+++ b/llvm/lib/Transforms/Utils/CodeMoverUtils.cpp
@@ -340,7 +340,7 @@ bool llvm::isSafeToMoveBefore(Instruction &I, Instruction &InsertPoint,
// If InsertPoint is in a BB that comes after I, then we cannot move if
// I is used in the terminator of the current BB.
if (I.getParent() != InsertPoint.getParent() &&
- UserInst == I.getParent()->getTerminator())
+ UserInst == I.getParent()->getTerminator())
return false;
if (UserInst != &InsertPoint && !DT.dominates(&InsertPoint, U)) {
// If UserInst is an instruction that appears later in the same BB as
``````````
</details>
https://github.com/llvm/llvm-project/pull/87857
More information about the llvm-commits
mailing list