[llvm] [AA/MSSA/LICM/Sink] Fix correctness and optimize better around atomics (PR #210568)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 18 20:30:53 PDT 2026
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 cpp,h -- llvm/include/llvm/Analysis/MemorySSA.h llvm/lib/Analysis/AliasAnalysis.cpp llvm/lib/Analysis/MemorySSA.cpp llvm/lib/Transforms/Scalar/LICM.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/llvm/lib/Analysis/MemorySSA.cpp b/llvm/lib/Analysis/MemorySSA.cpp
index f24f68a3c..8fb037b14 100644
--- a/llvm/lib/Analysis/MemorySSA.cpp
+++ b/llvm/lib/Analysis/MemorySSA.cpp
@@ -1084,8 +1084,9 @@ public:
return getClobberingMemoryAccess(MA, Loc, BAA, UpwardWalkLimit);
}
- MemoryAccess *getClobberingMemoryAccessForHoist(MemoryUseOrDef *MA,
- BatchAAResults &BAA) override {
+ MemoryAccess *
+ getClobberingMemoryAccessForHoist(MemoryUseOrDef *MA,
+ BatchAAResults &BAA) override {
unsigned UpwardWalkLimit = MaxCheckLimit;
return Walker->getClobberingMemoryAccessForHoistBase(MA, BAA,
UpwardWalkLimit);
@@ -1129,8 +1130,9 @@ public:
return getClobberingMemoryAccess(MA, Loc, BAA, UpwardWalkLimit);
}
- MemoryAccess *getClobberingMemoryAccessForHoist(MemoryUseOrDef *MA,
- BatchAAResults &BAA) override {
+ MemoryAccess *
+ getClobberingMemoryAccessForHoist(MemoryUseOrDef *MA,
+ BatchAAResults &BAA) override {
unsigned UpwardWalkLimit = MaxCheckLimit;
return Walker->getClobberingMemoryAccessForHoistBase(MA, BAA,
UpwardWalkLimit);
@@ -2697,8 +2699,9 @@ DoNothingMemorySSAWalker::getClobberingMemoryAccess(MemoryAccess *MA,
return MA;
}
-MemoryAccess *DoNothingMemorySSAWalker::getClobberingMemoryAccessForHoist(
- MemoryUseOrDef *MA, BatchAAResults &) {
+MemoryAccess *
+DoNothingMemorySSAWalker::getClobberingMemoryAccessForHoist(MemoryUseOrDef *MA,
+ BatchAAResults &) {
return MA->getDefiningAccess();
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/210568
More information about the llvm-commits
mailing list