summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/Passes.h
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-02-08 21:22:39 +0000
committerAndrew Trick <atrick@apple.com>2012-02-08 21:22:39 +0000
commitffea03f2165c5a4fda672495bf853aa2d8c7d1b5 (patch)
tree64ffa416f3803f75a86ee55727d19fb1419a6d6a /include/llvm/CodeGen/Passes.h
parentebe18ef5c286bb7c33f6c43f1963a7d22cd73f40 (diff)
downloadllvm-ffea03f2165c5a4fda672495bf853aa2d8c7d1b5.tar.gz
llvm-ffea03f2165c5a4fda672495bf853aa2d8c7d1b5.tar.bz2
llvm-ffea03f2165c5a4fda672495bf853aa2d8c7d1b5.tar.xz
Added TargetPassConfig::setOpt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150093 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/Passes.h')
-rw-r--r--include/llvm/CodeGen/Passes.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/Passes.h b/include/llvm/CodeGen/Passes.h
index 8849571731..7bc93114d6 100644
--- a/include/llvm/CodeGen/Passes.h
+++ b/include/llvm/CodeGen/Passes.h
@@ -39,6 +39,7 @@ class TargetPassConfig : public ImmutablePass {
protected:
TargetMachine *TM;
PassManagerBase &PM;
+ bool Initialized; // Flagged after all passes are configured.
// Target Pass Options
//
@@ -62,6 +63,8 @@ public:
return TM->getTargetLowering();
}
+ void setInitialized() { Initialized = true; }
+
CodeGenOpt::Level getOptLevel() const { return TM->getOptLevel(); }
void setDisableVerify(bool disable) { DisableVerify = disable; }
@@ -84,6 +87,9 @@ public:
/// Fully developed targets will not generally override this.
virtual void addMachinePasses();
protected:
+ // Helper to verify the analysis is really immutable.
+ void setOpt(bool &Opt, bool Val);
+
/// Methods with trivial inline returns are convenient points in the common
/// codegen pass pipeline where targets may insert passes. Methods with
/// out-of-line standard implementations are major CodeGen stages called by