summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2011-08-29 17:07:00 +0000
committerAndrew Trick <atrick@apple.com>2011-08-29 17:07:00 +0000
commit0e122d1c2422285c872f68fc0ae1f7e5d2739572 (patch)
treee4dffa5d52e4da8ef5b8e9621647657a2abba1ba /include
parent05d71380181a874cbe70bd2c30fa5eb71eb0d661 (diff)
downloadllvm-0e122d1c2422285c872f68fc0ae1f7e5d2739572.tar.gz
llvm-0e122d1c2422285c872f68fc0ae1f7e5d2739572.tar.bz2
llvm-0e122d1c2422285c872f68fc0ae1f7e5d2739572.tar.xz
Reapply r138695. Fix PassManager stack depths.
Patch by Xiaoyi Guo! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138737 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/LoopPass.h2
-rw-r--r--include/llvm/Analysis/RegionPass.h2
-rw-r--r--include/llvm/LinkAllPasses.h2
-rw-r--r--include/llvm/PassManagers.h7
4 files changed, 7 insertions, 6 deletions
diff --git a/include/llvm/Analysis/LoopPass.h b/include/llvm/Analysis/LoopPass.h
index 1603d2ea7a..e6ed9bccee 100644
--- a/include/llvm/Analysis/LoopPass.h
+++ b/include/llvm/Analysis/LoopPass.h
@@ -84,7 +84,7 @@ public:
class LPPassManager : public FunctionPass, public PMDataManager {
public:
static char ID;
- explicit LPPassManager(int Depth);
+ explicit LPPassManager();
/// run - Execute all of the passes scheduled for execution. Keep track of
/// whether any of the passes modifies the module, and if so, return true.
diff --git a/include/llvm/Analysis/RegionPass.h b/include/llvm/Analysis/RegionPass.h
index 1a93859bab..68f12012bc 100644
--- a/include/llvm/Analysis/RegionPass.h
+++ b/include/llvm/Analysis/RegionPass.h
@@ -88,7 +88,7 @@ class RGPassManager : public FunctionPass, public PMDataManager {
public:
static char ID;
- explicit RGPassManager(int Depth);
+ explicit RGPassManager();
/// @brief Execute all of the passes scheduled for execution.
///
diff --git a/include/llvm/LinkAllPasses.h b/include/llvm/LinkAllPasses.h
index 058bd637f9..e427f40aae 100644
--- a/include/llvm/LinkAllPasses.h
+++ b/include/llvm/LinkAllPasses.h
@@ -156,7 +156,7 @@ namespace {
(void)new llvm::FindUsedTypes();
(void)new llvm::ScalarEvolution();
((llvm::Function*)0)->viewCFGOnly();
- llvm::RGPassManager RGM(0);
+ llvm::RGPassManager RGM;
((llvm::RegionPass*)0)->runOnRegion((llvm::Region*)0, RGM);
llvm::AliasSetTracker X(*(llvm::AliasAnalysis*)0);
X.add((llvm::Value*)0, 0, 0); // for -print-alias-sets
diff --git a/include/llvm/PassManagers.h b/include/llvm/PassManagers.h
index c4f409ef52..c05347da79 100644
--- a/include/llvm/PassManagers.h
+++ b/include/llvm/PassManagers.h
@@ -263,7 +263,7 @@ private:
class PMDataManager {
public:
- explicit PMDataManager(int Depth) : TPM(NULL), Depth(Depth) {
+ explicit PMDataManager() : TPM(NULL), Depth(0) {
initializeAnalysisInfo();
}
@@ -333,6 +333,7 @@ public:
void setTopLevelManager(PMTopLevelManager *T) { TPM = T; }
unsigned getDepth() const { return Depth; }
+ void setDepth(unsigned newDepth) { Depth = newDepth; }
// Print routines used by debug-pass
void dumpLastUses(Pass *P, unsigned Offset) const;
@@ -408,8 +409,8 @@ private:
class FPPassManager : public ModulePass, public PMDataManager {
public:
static char ID;
- explicit FPPassManager(int Depth)
- : ModulePass(ID), PMDataManager(Depth) { }
+ explicit FPPassManager()
+ : ModulePass(ID), PMDataManager() { }
/// run - Execute all of the passes scheduled for execution. Keep track of
/// whether any of the passes modifies the module, and if so, return true.