aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2012-11-26 23:54:47 +0000
committerOwen Anderson <resistor@mac.com>2012-11-26 23:54:47 +0000
commit0d30d30d58253de6b8836a11effcfc38d7566841 (patch)
tree735048df468267d94355d52caf2c042ac4d575b2 /include
parent8d20b5f9ff609e70fae5c865931ab0f29e639d9c (diff)
Step towards implementation of pass manager with doInitialization and doFinalization per module detangled from runOn?? calls, still has temporary code not to break ASAN to be removed when that pass conforms to the proposed model
Patch by Pedro Artigas, with feedback from by Chandler Carruth. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168635 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/MachineModuleInfo.h3
-rw-r--r--include/llvm/Pass.h4
-rw-r--r--include/llvm/PassManager.h8
-rw-r--r--include/llvm/PassManagers.h4
4 files changed, 9 insertions, 10 deletions
diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h
index fc73a3d609..4660cad5d8 100644
--- a/include/llvm/CodeGen/MachineModuleInfo.h
+++ b/include/llvm/CodeGen/MachineModuleInfo.h
@@ -180,7 +180,10 @@ public:
const MCObjectFileInfo *MOFI);
~MachineModuleInfo();
+ using ModulePass::doInitialization;
bool doInitialization();
+
+ using ModulePass::doFinalization;
bool doFinalization();
/// EndFunction - Discard function meta information.
diff --git a/include/llvm/Pass.h b/include/llvm/Pass.h
index 7b6f169666..acfc6a251e 100644
--- a/include/llvm/Pass.h
+++ b/include/llvm/Pass.h
@@ -230,7 +230,7 @@ public:
/// doInitialization - Virtual method overridden by subclasses to do
/// any necessary initialization.
///
- virtual bool doInitialization() { return false; }
+ virtual bool doInitialization(Module &) { return false; }
/// runOnModule - Virtual method overriden by subclasses to process the module
/// being operated on.
@@ -239,7 +239,7 @@ public:
/// doFinalization - Virtual method overriden by subclasses to do any post
/// processing needed after all passes have run.
///
- virtual bool doFinalization() { return false; }
+ virtual bool doFinalization(Module &) { return false; }
virtual void assignPassManager(PMStack &PMS,
PassManagerType T);
diff --git a/include/llvm/PassManager.h b/include/llvm/PassManager.h
index 1d5e800b4d..ce5fda79f9 100644
--- a/include/llvm/PassManager.h
+++ b/include/llvm/PassManager.h
@@ -58,14 +58,6 @@ public:
/// whether any of the passes modifies the module, and if so, return true.
bool run(Module &M);
- /// doInitialization - Run all of the initializers for the module passes.
- ///
- bool doInitialization();
-
- /// doFinalization - Run all of the finalizers for the module passes.
- ///
- bool doFinalization();
-
private:
/// PassManagerImpl_New is the actual class. PassManager is just the
/// wraper to publish simple pass manager interface
diff --git a/include/llvm/PassManagers.h b/include/llvm/PassManagers.h
index b0450f3e00..385d6e1b55 100644
--- a/include/llvm/PassManagers.h
+++ b/include/llvm/PassManagers.h
@@ -462,6 +462,10 @@ public:
virtual PassManagerType getPassManagerType() const {
return PMT_FunctionPassManager;
}
+
+protected:
+ // FIXME: due to limitation in AddressSanitizer
+ bool RunFinalization;
};
Timer *getPassTimer(Pass *);