[PATCH] Exit ScalarEvolution::getMulExpr Early when Choose Overflows
tjablin at gmail.com
Thu Aug 28 17:17:59 PDT 2014
ScalarEvolution::getMulExpr could take a very long time to execute when there is a long change of dependent multiplication. Worse yet, when the number of operands was very high, Overflow would be set consistently in the middle of the loop, so no progress was actually made in simplifying the SCEV. By testing for overflow early, we can avoid entering the loop in the first place. I have included a test case (choose-overflow-fast.ll) that takes a very long time (probably hours) to execute without this patch. After applying the patch, the test completes in about 1.5 seconds.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4003 bytes
Desc: not available
More information about the llvm-commits