[PATCH] D33984: [ScalarEvolution] Apply Depth limit to getMulExpr
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 15 04:46:58 PDT 2017
mkazantsev marked an inline comment as done.
mkazantsev added inline comments.
================
Comment at: lib/Analysis/ScalarEvolution.cpp:2860
}
- return getMulExpr(Ops);
+ return getMulExpr(Ops, SCEV::FlagAnyWrap, Depth + 1);
}
----------------
sanjoy wrote:
> Something worth considering (no need to change in this patch) -- should we be incrementing `Depth` on tail calls like these where there is no real recursion?
Not sure, may be reasonable to not do it since we always remove the number of ops here and cannot go to infinite recursion.
https://reviews.llvm.org/D33984
More information about the llvm-commits
mailing list