[llvm] [MemCpyOpt] move SrcAlloca to the entry if transformation is performed (PR #67226)

via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 25 01:35:05 PDT 2023


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 a6e81df289ec21a535971469d117d2ebe6ccabf4 560f80d75f7e6f9bd67f8e14be435b1f0612942c -- llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp b/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
index ccb8eadab487..4db9d1b6d309 100644
--- a/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
+++ b/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
@@ -1598,7 +1598,8 @@ bool MemCpyOptPass::performStackMoveOptzn(Instruction *Load, Instruction *Store,
   if (!CaptureTrackingWithModRef(SrcAlloca, SrcModRefCallback))
     return false;
 
-  // We can do the transformation. First, move the SrcAlloca to the start of the BB.
+  // We can do the transformation. First, move the SrcAlloca to the start of the
+  // BB.
   if (SrcNotDom)
     SrcAlloca->moveBefore(*SrcAlloca->getParent(),
                           SrcAlloca->getParent()->getFirstInsertionPt());

``````````

</details>


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


More information about the llvm-commits mailing list