]> granicus.if.org Git - llvm/commit
Preserve domtree and loop-simplify for runtime unrolling.
authorEli Friedman <efriedma@codeaurora.org>
Wed, 18 Jan 2017 23:26:37 +0000 (23:26 +0000)
committerEli Friedman <efriedma@codeaurora.org>
Wed, 18 Jan 2017 23:26:37 +0000 (23:26 +0000)
commite3502119aebcccad354a85ad1dfea1d23e058bcc
treeac5841204530248e474b226d3f26cffb4efb6848
parenta8b917bef3302e6b722c0dc54dff026f42c2b630
Preserve domtree and loop-simplify for runtime unrolling.

Mostly straightforward changes; we just didn't do the computation before.
One sort of interesting change in LoopUnroll.cpp: we weren't handling
dominance for children of the loop latch correctly, but
foldBlockIntoPredecessor hid the problem for complete unrolling.

Currently punting on loop peeling; made some minor changes to isolate
that problem to LoopUnrollPeel.cpp.

Adds a flag -unroll-verify-domtree; it verifies the domtree immediately
after we finish updating it. This is on by default for +Asserts builds.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292447 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/UnrollLoop.h
lib/Transforms/Utils/LoopUnroll.cpp
lib/Transforms/Utils/LoopUnrollPeel.cpp
lib/Transforms/Utils/LoopUnrollRuntime.cpp