[llvm] LAA: drop unnecessary args, clarifying APIs (PR #127479)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 17 04:26:42 PST 2025


================
@@ -1445,15 +1451,9 @@ void AccessAnalysis::processMemAccesses() {
   }
 }
 
-/// Return true if an AddRec pointer \p Ptr is unsigned non-wrapping,
-/// i.e. monotonically increasing/decreasing.
-static bool isNoWrapAddRec(Value *Ptr, const SCEVAddRecExpr *AR,
-                           PredicatedScalarEvolution &PSE, const Loop *L) {
-
-  // FIXME: This should probably only return true for NUW.
-  if (AR->getNoWrapFlags(SCEV::NoWrapMask))
-    return true;
-
+/// Check whether \p Ptr is non-wrapping GEP.
+static bool isNoWrapGEP(Value *Ptr, PredicatedScalarEvolution &PSE,
+                        const Loop *L) {
   if (PSE.hasNoOverflow(Ptr, SCEVWrapPredicate::IncrementNUSW))
     return true;
----------------
fhahn wrote:

move this logic to the caller as well, as it also handles non-GEPs?

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


More information about the llvm-commits mailing list