[PATCH] D103007: [LoopUtils] Avoid expanding complicated SCEVNAry when rewriteLoopExitValues
guopeilin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 24 05:42:48 PDT 2021
guopeilin added a comment.
In D103007#2776598 <https://reviews.llvm.org/D103007#2776598>, @lebedev.ri wrote:
> I'm not a fan of this direction.
> Which stack overflow are you seeing?
The details are that the variable `%add.i.2.i` can be computed by SCEV, and after expanding the SCEV value, this variable contains thousands of operands.
During ISel, we need to build a SelectionDAG first, so we need to visit all the operands to build SDNodes, and this will exhaust the stack due to plenty of operands.
Also, if you use `opt -indvars -S`, you can see that the program keeps printing the IR for a very long long time. More specifically, the program keeps printing the replaced variable.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103007/new/
https://reviews.llvm.org/D103007
More information about the llvm-commits
mailing list