analyze() now checks to see that we don't analyze the same method twice.
authorVikram S. Adve <vadve@cs.uiuc.edu>
Tue, 28 Aug 2001 22:36:35 +0000 (22:36 +0000)
committerVikram S. Adve <vadve@cs.uiuc.edu>
Tue, 28 Aug 2001 22:36:35 +0000 (22:36 +0000)
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

lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp
lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.cpp

index 91c2498e9750c46cee02264642fcefc6d54ecf9c..e47c9d2bc3c63730030f1f96093f78931da0f504 100644 (file)
@@ -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
index 91c2498e9750c46cee02264642fcefc6d54ecf9c..e47c9d2bc3c63730030f1f96093f78931da0f504 100644 (file)
@@ -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