diff --git a/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp b/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp index 91c2498e975..e47c9d2bc3c 100644 --- a/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp +++ b/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp @@ -114,7 +114,11 @@ bool MethodLiveVarInfo::doSingleBackwardPass() // performs live var anal for a method void MethodLiveVarInfo::analyze() { - + // Don't analyze the same method twice! + // Later, we need to add change notification here. + if (HasAnalyzed) + return; + if( DEBUG_LV) cout << "Analysing live variables ..." << endl; // create and initialize all the BBLiveVars of the CFG diff --git a/lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.cpp b/lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.cpp index 91c2498e975..e47c9d2bc3c 100644 --- a/lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.cpp +++ b/lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.cpp @@ -114,7 +114,11 @@ bool MethodLiveVarInfo::doSingleBackwardPass() // performs live var anal for a method void MethodLiveVarInfo::analyze() { - + // Don't analyze the same method twice! + // Later, we need to add change notification here. + if (HasAnalyzed) + return; + if( DEBUG_LV) cout << "Analysing live variables ..." << endl; // create and initialize all the BBLiveVars of the CFG