commit 450e7888a9c8a5b8e39e69c6eb5c0e39f8606d37
Author: ether <ethe...@gmail.com>
Date: Mon Apr 4 10:58:29 2011 +0800
RegionSimplify: Put the new splitted entry block to the region's parent.
diff --git a/lib/RegionSimplify.cpp b/lib/RegionSimplify.cpp
index 403d3ae..eb61e38 100644
--- a/lib/RegionSimplify.cpp
+++ b/lib/RegionSimplify.cpp
@@ -116,6 +116,10 @@ void RegionSimplify::createSingleEntryEdge(Region *R) {
// the entry node with their parents.
// all parent regions whose entry is oldEntry are updated with newEntry
Region *r = R->getParent();
+
+ // Put the new entry to R's parent.
+ RI->setRegionFor(newEntry,r);
+
while (r->getEntry() == oldEntry && !r->isTopLevelRegion()) {
r->replaceEntry(newEntry);
r = r->getParent();