aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp')
-rw-r--r--lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp b/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp
index b9fd0ffbe8..40ebf1e6bd 100644
--- a/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp
+++ b/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp
@@ -66,6 +66,22 @@ void MethodLiveVarInfo::constructBBs()
if(DEBUG_LV)
LVBB->printAllSets();
}
+
+ // Since the PO iterator does not discover unreachable blocks,
+ // go over the random iterator and init those blocks as well.
+ // However, LV info is not correct for those blocks (they are not
+ // analyzed)
+
+ Method::const_iterator BBRI = Meth->begin(); // random iterator for BBs
+
+ for( ; BBRI != Meth->end(); ++BBRI, ++POId) {
+
+ if( ! BB2BBLVMap[ *BBRI ] )
+ BB2BBLVMap[ *BBRI ] = new BBLiveVar( *BBRI, POId );
+
+ }
+
+
}