Introduce splitBlock and use it in splitEntryBlockForAlloca
authorMichael Kruse <llvm@meinersbur.de>
Tue, 11 Aug 2015 14:04:06 +0000 (14:04 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Tue, 11 Aug 2015 14:04:06 +0000 (14:04 +0000)
commit23d0e83aa3745c51e1c32afa952e5bcec53cd251
tree87175baf3a5087efef6e8d698a9883bad6f97912
parent81f1ffdbbbc59aa98a26b7e746f9a75eeb0182ca
Introduce splitBlock and use it in splitEntryBlockForAlloca

RegionInfo::splitBlock did not update RegionInfo correctly. Specifically, it tried to make the new block the entry block if possible. This breaks for nested regions that have edges to the old block.

We simply do not change the entry block. Updating RegionInfo becomes trivial as both block will always be in the same region.

splitEntryBlockForAlloca makes use of the new splitBlock.

Reviewers: grosser

Part of Differential Revision: http://reviews.llvm.org/D11867

llvm-svn: 244600
polly/lib/Support/ScopHelper.cpp