[PATCH] D14526: Don't recompute LCSSA after loop-unrolling when possible.

Michael Zolotukhin via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 9 20:54:59 PST 2015


mzolotukhin created this revision.
mzolotukhin added reviewers: chandlerc, hfinkel, dexonsmith, bogner, joker.eph.
mzolotukhin added a subscriber: llvm-commits.

Currently we always recompute LCSSA for outer loops after unrolling an
inner loop. That leads to compile time problem when we have big loop
nests, and we can solve it by avoiding unnecessary work. For instance,
if w eonly do partial unrolling, we don't break LCSSA, so we don't need
to rebuild it. Also, if all exits from the inner loop are inside the
enclosing loop, then complete unrolling won't break LCSSA either.

I replaced unconditional LCSSA recomputation with conditional recomputation +
unconditional assert and added several tests, which were failing when I
experimented with it.

Soon I plan to follow up with a similar patch for recalculation of dominators
tree.

http://reviews.llvm.org/D14526

Files:
  lib/Transforms/Utils/LoopUnroll.cpp
  test/Transforms/LoopUnroll/rebuild_lcssa.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14526.39782.patch
Type: text/x-patch
Size: 4821 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151110/ed9581f9/attachment.bin>


More information about the llvm-commits mailing list