summaryrefslogtreecommitdiff
path: root/include/llvm/Pass.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-10-08 17:00:02 +0000
committerDan Gohman <gohman@apple.com>2009-10-08 17:00:02 +0000
commit8a261e44f71a433b7d9af373c3e3dfa6fea67146 (patch)
tree0f0a78c5c187f1764a43d34439e7cbaecbb9323b /include/llvm/Pass.h
parentd4a537be0574460e9369152ca482456ccabac776 (diff)
downloadllvm-8a261e44f71a433b7d9af373c3e3dfa6fea67146.tar.gz
llvm-8a261e44f71a433b7d9af373c3e3dfa6fea67146.tar.bz2
llvm-8a261e44f71a433b7d9af373c3e3dfa6fea67146.tar.xz
Add a form of addPreserved which takes a string argument, to allow passes
to declare that they preserve other passes without needing to pull in additional header file or library dependencies. Convert MachineFunctionPass and CodeGenLICM to make use of this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83555 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Pass.h')
-rw-r--r--include/llvm/Pass.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Pass.h b/include/llvm/Pass.h
index f3f71c870d..eb4c92281c 100644
--- a/include/llvm/Pass.h
+++ b/include/llvm/Pass.h
@@ -46,6 +46,7 @@ class PMStack;
class AnalysisResolver;
class PMDataManager;
class raw_ostream;
+class StringRef;
// AnalysisID - Use the PassInfo to identify a pass...
typedef const PassInfo* AnalysisID;
@@ -164,6 +165,10 @@ public:
// or null if it is not known.
static const PassInfo *lookupPassInfo(intptr_t TI);
+ // lookupPassInfo - Return the pass info object for the pass with the given
+ // argument string, or null if it is not known.
+ static const PassInfo *lookupPassInfo(const StringRef &Arg);
+
/// getAnalysisIfAvailable<AnalysisType>() - Subclasses use this function to
/// get analysis information that might be around, for example to update it.
/// This is different than getAnalysis in that it can fail (if the analysis