diff options
author | Andrew Trick <atrick@apple.com> | 2012-02-08 21:22:39 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-02-08 21:22:39 +0000 |
commit | ffea03f2165c5a4fda672495bf853aa2d8c7d1b5 (patch) | |
tree | 64ffa416f3803f75a86ee55727d19fb1419a6d6a /include/llvm/CodeGen/Passes.h | |
parent | ebe18ef5c286bb7c33f6c43f1963a7d22cd73f40 (diff) | |
download | llvm-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.h | 6 |
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 |