diff options
author | Devang Patel <dpatel@apple.com> | 2008-03-18 00:39:19 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2008-03-18 00:39:19 +0000 |
commit | 1cee94f04111cfd7114979d6dfddce2669c9380d (patch) | |
tree | dcbe3d4a2811447eec457bce66c90106e4245c24 /lib/Analysis/IPA | |
parent | b176038f989d98ac9f5f1dc2b52b6ef1723b2b78 (diff) | |
download | external_llvm-1cee94f04111cfd7114979d6dfddce2669c9380d.zip external_llvm-1cee94f04111cfd7114979d6dfddce2669c9380d.tar.gz external_llvm-1cee94f04111cfd7114979d6dfddce2669c9380d.tar.bz2 |
Identify Analysis pass.
Do not run analysis pass again if analysis info is still available.
This fixes PR1441.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48476 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA')
-rw-r--r-- | lib/Analysis/IPA/Andersens.cpp | 3 | ||||
-rw-r--r-- | lib/Analysis/IPA/GlobalsModRef.cpp | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/Analysis/IPA/Andersens.cpp b/lib/Analysis/IPA/Andersens.cpp index 5557c01..8650fb1 100644 --- a/lib/Analysis/IPA/Andersens.cpp +++ b/lib/Analysis/IPA/Andersens.cpp @@ -432,6 +432,9 @@ namespace { static char ID; Andersens() : ModulePass((intptr_t)&ID) {} + /// isAnalysis - Return true if this pass is implementing an analysis pass. + virtual bool isAnalysis() const { return true; } + bool runOnModule(Module &M) { InitializeAliasAnalysis(this); IdentifyObjects(M); diff --git a/lib/Analysis/IPA/GlobalsModRef.cpp b/lib/Analysis/IPA/GlobalsModRef.cpp index 9aafe37..9f0159e 100644 --- a/lib/Analysis/IPA/GlobalsModRef.cpp +++ b/lib/Analysis/IPA/GlobalsModRef.cpp @@ -86,6 +86,9 @@ namespace { static char ID; GlobalsModRef() : ModulePass((intptr_t)&ID) {} + /// isAnalysis - Return true if this pass is implementing an analysis pass. + virtual bool isAnalysis() const { return true; } + bool runOnModule(Module &M) { InitializeAliasAnalysis(this); // set up super class AnalyzeGlobals(M); // find non-addr taken globals |