analyze() now checks to see that we don't analyze the same method twice.
Needs a mechnanism to override this check (e.g., after a transformation).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@391 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp b/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp
index 91c2498..e47c9d2 100644
--- a/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp
+++ b/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp
@@ -114,7 +114,11 @@
 // 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