[PATCH] D34273: [SCEV] Use depth limit instead of local cache for SExt and ZExt
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 22 22:08:21 PDT 2017
mkazantsev added inline comments.
================
Comment at: lib/Analysis/ScalarEvolution.cpp:1579
return getAddRecExpr(
- getExtendAddRecStart<SCEVZeroExtendExpr>(AR, Ty, this, Cache),
- getZeroExtendExprCached(Step, Ty, Cache), L, AR->getNoWrapFlags());
+ getExtendAddRecStart<SCEVZeroExtendExpr>(AR, Ty, this),
+ getZeroExtendExpr(Step, Ty, Depth + 1), L, AR->getNoWrapFlags());
----------------
mkazantsev wrote:
> wmi wrote:
> > Do we want to pass Depth into getExtendAddRecStart? Since getZeroExtendExpr and getSignExtendExpr can be called recursively inside of getExtendAddRecStart.
> Thanks for pointing out! I will go through all invocations here, maybe we are missing it somewhere else.
Wei, actually I failed to find a place where getAddRecExpr invokes either of them. I only see it invoing itself. We maybe need a separate depth limit for it, but it is out of scope of this patch.
If you know a way how getSign/ZeroExt can be invoked from getAddRecExpr, could you please point it out?
https://reviews.llvm.org/D34273
More information about the llvm-commits
mailing list