[llvm] MemCpyOpt: replace an AA query with MSSA query (NFC) (PR #108535)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 23 04:16:16 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 d4f6ad51603405ab4e998fa6416bfdff4b1f43d4 2c7c9ac19b3daae9eba3a55edaad49c1a485d520 --extensions cpp -- 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 45aec420e8..2f88b19a8d 100644
--- a/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
+++ b/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
@@ -654,9 +654,8 @@ bool MemCpyOptPass::processStoreOfLoad(StoreInst *SI, LoadInst *LI,
// We use MSSA to check if an instruction may store to the memory we load
// from in between the load and the store. If such an instruction is found,
// we try to promote there instead of at the store position.
- auto *Clobber =
- MSSA->getWalker()->getClobberingMemoryAccess(
- StoreAccess->getDefiningAccess(), LoadLoc, BAA);
+ auto *Clobber = MSSA->getWalker()->getClobberingMemoryAccess(
+ StoreAccess->getDefiningAccess(), LoadLoc, BAA);
Instruction *P = MSSA->dominates(LoadAccess, Clobber)
? cast<MemoryUseOrDef>(Clobber)->getMemoryInst()
: SI;
``````````
</details>
https://github.com/llvm/llvm-project/pull/108535
More information about the llvm-commits
mailing list