[llvm] Bug fixes for Array Dependence Analysis (PR #116389)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 15 06:51:30 PST 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 d492001bdcd7bfcd19ada7459a6b0eaf81ba3ba2 f729a6c84fbcf88c088bbc958208ce525bdb9e12 --extensions cpp -- llvm/lib/Analysis/DependenceAnalysis.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Analysis/DependenceAnalysis.cpp b/llvm/lib/Analysis/DependenceAnalysis.cpp
index c97af9a8dc..bbe75156b8 100644
--- a/llvm/lib/Analysis/DependenceAnalysis.cpp
+++ b/llvm/lib/Analysis/DependenceAnalysis.cpp
@@ -723,7 +723,8 @@ static AliasResult underlyingObjectsAlias(AAResults *AA, LoopInfo *LI,
const Value *BObj = getUnderlyingObject(LocB.Ptr);
if (AObj == BObj) {
- // The dependence test gets confused if the size of the memory accesses differ.
+ // The dependence test gets confused if the size of the memory accesses
+ // differ.
if (LocA.Size != LocB.Size)
return AliasResult::MayAlias;
@@ -3163,9 +3164,7 @@ const SCEV *DependenceInfo::addToCoefficient(const SCEV *Expr,
const SCEV *Value) const {
const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(Expr);
if (!AddRec) // create a new addRec
- return SE->getAddRecExpr(Expr,
- Value,
- TargetLoop,
+ return SE->getAddRecExpr(Expr, Value, TargetLoop,
SCEV::FlagNSW); // Worst case, with no info.
if (AddRec->getLoop() == TargetLoop) {
const SCEV *Sum = SE->getAddExpr(AddRec->getStepRecurrence(*SE), Value);
@@ -4074,7 +4073,8 @@ const SCEV *DependenceInfo::getSplitIteration(const Dependence &Dep,
assert(Dst->mayReadFromMemory() || Dst->mayWriteToMemory());
assert(isLoadOrStore(Src));
assert(isLoadOrStore(Dst));
- assert(underlyingObjectsAlias(AA, LI, SE, Dst, Src) == AliasResult::MustAlias);
+ assert(underlyingObjectsAlias(AA, LI, SE, Dst, Src) ==
+ AliasResult::MustAlias);
// establish loop nesting levels
establishNestingLevels(Src, Dst);
``````````
</details>
https://github.com/llvm/llvm-project/pull/116389
More information about the llvm-commits
mailing list