From 8b5f6cc0a4805c8cc64c22b02d34009452ebeef2 Mon Sep 17 00:00:00 2001 From: "Vikram S. Adve" Date: Tue, 28 Aug 2001 22:36:35 +0000 Subject: [PATCH] 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 --- lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp | 6 +++++- lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.cpp | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) 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