From 6ffa0a7f7cac9c360dbc416a6f4e5054f55cbad1 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 25 Sep 2002 22:26:52 +0000 Subject: [PATCH] * Fix ugly bug in previous checkin where I reused the name 'i' one too many times * Print out immutable passes in the -debug-pass=Structure report. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3923 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/PassManagerT.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/VMCore/PassManagerT.h b/lib/VMCore/PassManagerT.h index df54b06331f..913a64f89ee 100644 --- a/lib/VMCore/PassManagerT.h +++ b/lib/VMCore/PassManagerT.h @@ -173,15 +173,16 @@ public: CurrentAnalyses.clear(); // Add any immutable passes to the CurrentAnalyses set... - for (unsigned i = 0, e = ImmutablePasses.size(); i != e; ++i) - if (const PassInfo *PI = ImmutablePasses[i]->getPassInfo()) { - CurrentAnalyses[PI] = ImmutablePasses[i]; + for (unsigned i = 0, e = ImmutablePasses.size(); i != e; ++i) { + ImmutablePass *IPass = ImmutablePasses[i]; + if (const PassInfo *PI = IPass->getPassInfo()) { + CurrentAnalyses[PI] = IPass; const std::vector &II = PI->getInterfacesImplemented(); for (unsigned i = 0, e = II.size(); i != e; ++i) - CurrentAnalyses[II[i]] = ImmutablePasses[i]; + CurrentAnalyses[II[i]] = IPass; } - + } // LastUserOf - This contains the inverted LastUseOfMap... std::map > LastUserOf; @@ -297,6 +298,10 @@ public: // dumpPassStructure - Implement the -debug-passes=PassStructure option virtual void dumpPassStructure(unsigned Offset = 0) { + // Print out the immutable passes... + for (unsigned i = 0, e = ImmutablePasses.size(); i != e; ++i) + ImmutablePasses[i]->dumpPassStructure(0); + std::cerr << std::string(Offset*2, ' ') << Traits::getPMName() << " Pass Manager\n"; for (typename std::vector::iterator