]> granicus.if.org Git - llvm/commit
Delay dominator updation while cloning loop.
authorVikram TV <vikram.tarikere@gmail.com>
Sat, 11 Jun 2016 16:41:10 +0000 (16:41 +0000)
committerVikram TV <vikram.tarikere@gmail.com>
Sat, 11 Jun 2016 16:41:10 +0000 (16:41 +0000)
commitd1fd57765b78eaad11acad79d17b4703b67a9d71
tree981a08fc175f788f164b8989462d1b43df52b7ce
parentfd46fc33228c0a4749c1a61d8e736b98e0a6d034
Delay dominator updation while cloning loop.

Summary:
Dominator updation fails for a loop inserted with a new basicblock.

A block required by DT to set the IDom might not have been cloned yet. This is because there is no predefined ordering of loop blocks (except for the header block which should be the first block in the list).

The patch first creates DT nodes for the cloned blocks and then separately updates the DT in a follow-on loop.

Reviewers: anemet, dberlin

Subscribers: dberlin, llvm-commits

Differential Revision: http://reviews.llvm.org/D20899

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272479 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/CloneFunction.cpp