[LoopInterchange] Preserve LoopInfo after interchanging.
authorFlorian Hahn <florian.hahn@arm.com>
Thu, 5 Apr 2018 09:48:45 +0000 (09:48 +0000)
committerFlorian Hahn <florian.hahn@arm.com>
Thu, 5 Apr 2018 09:48:45 +0000 (09:48 +0000)
commit831a757728bcbb8b062ec102b9794c2dec7f82a6
tree4843e81ff8b0ed96dfbc3d98cbe9ff3113065807
parent44e2e9f1c5b755001fe32319d1cf933b77c0aef8
[LoopInterchange] Preserve LoopInfo after interchanging.

LoopInterchange relies on LoopInfo being up-to-date, so we should
preserve it after interchanging. This patch updates restructureLoops to
move the BBs of the interchanged loops to the right place.

Reviewers: davide, efriedma, karthikthecool, mcrosier

Reviewed By: efriedma

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

llvm-svn: 329264
14 files changed:
llvm/lib/Transforms/Scalar/LoopInterchange.cpp
llvm/test/Transforms/LoopInterchange/call-instructions.ll
llvm/test/Transforms/LoopInterchange/currentLimitation.ll
llvm/test/Transforms/LoopInterchange/interchange-flow-dep-outer.ll
llvm/test/Transforms/LoopInterchange/interchange-insts-between-indvar.ll
llvm/test/Transforms/LoopInterchange/interchange-no-deps.ll
llvm/test/Transforms/LoopInterchange/interchangeable.ll
llvm/test/Transforms/LoopInterchange/loop-interchange-optimization-remarks.ll
llvm/test/Transforms/LoopInterchange/not-interchanged-dependencies-1.ll
llvm/test/Transforms/LoopInterchange/not-interchanged-loop-nest-3.ll
llvm/test/Transforms/LoopInterchange/not-interchanged-tightly-nested.ll
llvm/test/Transforms/LoopInterchange/phi-ordering.ll
llvm/test/Transforms/LoopInterchange/profitability.ll
llvm/test/Transforms/LoopInterchange/reductions.ll