diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-01-08 22:57:07 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-01-08 22:57:07 +0000 |
commit | 60e2c4b4e74045563e01b345de518563b9807677 (patch) | |
tree | f55c0c5b06e4d04453d6aa20d12c08b87d3ded22 /llvm/lib | |
parent | 9d541588afa0c870e108ea78de4aad315d5b4175 (diff) | |
download | bcm5719-llvm-60e2c4b4e74045563e01b345de518563b9807677.tar.gz bcm5719-llvm-60e2c4b4e74045563e01b345de518563b9807677.zip |
Saem Ghani's PassManager Patch #8:
This fixes a "gccass" regression. The -debug-pass=Structure option now
prints all the appropriate output
llvm-svn: 25151
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/VMCore/PassManagerT.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/PassManagerT.h b/llvm/lib/VMCore/PassManagerT.h index c346aceb2d9..6cd109ea517 100644 --- a/llvm/lib/VMCore/PassManagerT.h +++ b/llvm/lib/VMCore/PassManagerT.h @@ -288,7 +288,7 @@ public: assert(dynamic_cast<PassClass*>(this) && "It wasn't the PassClass I thought it was"); if (Parent == 0) - PMDebug::PerformPassStartupStuff((dynamic_cast<PassClass*>(this))); + PMDebug::PerformPassStartupStuff((dynamic_cast<PMType*>(this))); // Run all of the passes for (unsigned i = 0, e = Passes.size(); i < e; ++i) { @@ -399,8 +399,9 @@ public: } // dumpPassStructure - Implement the -debug-passes=PassStructure option - virtual void dumpPassStructure(unsigned Offset = 0) { + inline void dumpPassStructure(unsigned Offset = 0) { // Print out the immutable passes... + for (unsigned i = 0, e = ImmutablePasses.size(); i != e; ++i) ImmutablePasses[i]->dumpPassStructure(0); @@ -653,6 +654,7 @@ private: } } } + public: // When an ImmutablePass is added, it gets added to the top level pass // manager. @@ -723,6 +725,10 @@ public: virtual ~BasicBlockPassManager() {} + virtual void dumpPassStructure(unsigned Offset = 0) { + PassManagerT<BBTraits>::dumpPassStructure(Offset); + } + // getPMName() - Return the name of the unit the PassManager operates on for // debugging. virtual const char *getPMName() const { return "BasicBlock"; } @@ -761,6 +767,10 @@ public: virtual ~FunctionPassManagerT() {} + virtual void dumpPassStructure(unsigned Offset = 0) { + PassManagerT<FTraits>::dumpPassStructure(Offset); + } + // getPMName() - Return the name of the unit the PassManager operates on for // debugging. virtual const char *getPMName() const { return "Function"; } @@ -804,6 +814,10 @@ public: virtual ~ModulePassManager() {} + virtual void dumpPassStructure(unsigned Offset = 0) { + PassManagerT<MTraits>::dumpPassStructure(Offset); + } + // getPMName() - Return the name of the unit the PassManager operates on for // debugging. virtual const char *getPassName() const { return "Module Pass Manager"; } |