]> granicus.if.org Git - llvm/commit
[PM] Teach LoopUnroll to update the LPM infrastructure as it unrolls
authorChandler Carruth <chandlerc@gmail.com>
Wed, 25 Jan 2017 02:49:01 +0000 (02:49 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 25 Jan 2017 02:49:01 +0000 (02:49 +0000)
commitf541c745520e150b25e5d2f44e383d5da2f977e2
treeb9759724fe6b98810076f0769e20d77b53f0770f
parentc484c05a186038a04c13458b289fd39d0d8143b1
[PM] Teach LoopUnroll to update the LPM infrastructure as it unrolls
loops.

We do this by reconstructing the newly added loops after the unroll
completes to avoid threading pass manager details through all the mess
of the unrolling infrastructure.

I've enabled some extra assertions in the LPM to try and catch issues
here and enabled a bunch of unroller tests to try and make sure this is
sane.

Currently, I'm manually running loop-simplify when needed. That should
go away once it is folded into the LPM infrastructure.

Differential Revision: https://reviews.llvm.org/D28848

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293011 91177308-0d34-0410-b5e6-96231b3b80d8
19 files changed:
lib/Transforms/Scalar/LoopPassManager.cpp
lib/Transforms/Scalar/LoopUnrollPass.cpp
test/Transforms/LoopUnroll/basic.ll
test/Transforms/LoopUnroll/full-unroll-bad-cost.ll
test/Transforms/LoopUnroll/full-unroll-crashers.ll
test/Transforms/LoopUnroll/full-unroll-heuristics-2.ll
test/Transforms/LoopUnroll/full-unroll-heuristics-cmp.ll
test/Transforms/LoopUnroll/full-unroll-heuristics-dce.ll
test/Transforms/LoopUnroll/full-unroll-heuristics-geps.ll
test/Transforms/LoopUnroll/full-unroll-heuristics-phi-prop.ll
test/Transforms/LoopUnroll/full-unroll-keep-first-exit.ll
test/Transforms/LoopUnroll/revisit.ll [new file with mode: 0644]
test/Transforms/LoopUnroll/runtime-loop.ll
test/Transforms/LoopUnroll/runtime-loop1.ll
test/Transforms/LoopUnroll/runtime-loop2.ll
test/Transforms/LoopUnroll/runtime-loop3.ll
test/Transforms/LoopUnroll/runtime-loop5.ll
test/Transforms/LoopUnroll/unloop.ll
test/Transforms/LoopUnroll/update-loop-info-in-subloops.ll