[llvm] [LAA] Rewrite findForkedPointer (NFCI) (PR #140298)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Tue May 20 06:20:17 PDT 2025
================
@@ -1088,29 +1092,49 @@ static void findForkedSCEVs(
}
}
-static SmallVector<PointerIntPair<const SCEV *, 1, bool>>
-findForkedPointer(PredicatedScalarEvolution &PSE,
- const DenseMap<Value *, const SCEV *> &StridesMap, Value *Ptr,
- const Loop *L) {
- ScalarEvolution *SE = PSE.getSE();
- assert(SE->isSCEVable(Ptr->getType()) && "Value is not SCEVable!");
- SmallVector<PointerIntPair<const SCEV *, 1, bool>> Scevs;
- findForkedSCEVs(SE, L, Ptr, Scevs, MaxForkedSCEVDepth);
-
- // For now, we will only accept a forked pointer with two possible SCEVs
- // that are either SCEVAddRecExprs or loop invariant.
- if (Scevs.size() == 2 &&
----------------
artagnon wrote:
I know. Although I'm not 100% sure, I think we always have either one or two unique forked pointers from my reading of findForkedSCEVs.
https://github.com/llvm/llvm-project/pull/140298
More information about the llvm-commits
mailing list