]> granicus.if.org Git - llvm/commit
[simplifycfg][loop-simplify] Preserve loop metadata in 2 transformations.
authorFlorian Hahn <florian.hahn@arm.com>
Fri, 18 Nov 2016 13:12:07 +0000 (13:12 +0000)
committerFlorian Hahn <florian.hahn@arm.com>
Fri, 18 Nov 2016 13:12:07 +0000 (13:12 +0000)
commit8a56643640ade4aabeb85b48382280d0aa25ca40
treeb122e7e8f76d628065a0e689fe658d307b897d8a
parentf482b59d3c56bf403546f7cc2df71338b9a13bee
[simplifycfg][loop-simplify] Preserve loop metadata in 2 transformations.

insertUniqueBackedgeBlock in lib/Transforms/Utils/LoopSimplify.cpp now
propagates existing llvm.loop metadata to newly the added backedge.

llvm::TryToSimplifyUncondBranchFromEmptyBlock in lib/Transforms/Utils/Local.cpp
now propagates existing llvm.loop metadata to the branch instructions in the
predecessor blocks of the empty block that is removed.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287341 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/Local.cpp
lib/Transforms/Utils/LoopSimplify.cpp
test/Transforms/LoopSimplify/preserve-llvm-loop-metadata.ll [new file with mode: 0644]
test/Transforms/SimplifyCFG/preserve-llvm-loop-metadata.ll [new file with mode: 0644]