[PATCH] D16838: [LoopUnrolling] Try harder to avoid rebuilding LCSSA when possible.
Michael Zolotukhin via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 2 19:49:06 PST 2016
mzolotukhin created this revision.
mzolotukhin added reviewers: chandlerc, hfinkel, dexonsmith, bogner, joker.eph.
mzolotukhin added a subscriber: llvm-commits.
In r255133 (reapplied r253126) we started to avoid redundant recomputation of LCSSA after loop-unrolling. This patch moves one step further in this direction - now we can avoid it for much wider range of loops, as we start to look at IR and try to figure out if the transformation actually breaks LCSSA phis or makes it necessary to insert new ones.
In future we might go even further and try to fix LCSSA in-place rather than rebuilding it, but I'm not quite sure yet that it's always possible (and computationally cheaper). Anyway, this patch seems to be aligned with that direction.
One of the most important use-cases that previous implementation didn't handle is loops with calls that might throw an exception. Such loops have exits from entire loop nest, but we still don't need to recompute LCSSA after unrolling, as such exits usually don't contain LCSSA phis.
The patch was tested on LNT testsuite + SPECS, neither failures nor significant compile time changes were spotted.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4667 bytes
Desc: not available
More information about the llvm-commits