1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

Revert r111199; it breaks -debug-pass=Structure output.

llvm-svn: 111500
This commit is contained in:
Dan Gohman 2010-08-19 01:29:07 +00:00
parent 3f1dd52a7c
commit bb27588b3f
6 changed files with 15 additions and 26 deletions

View File

@ -163,7 +163,7 @@ public:
virtual void verifyAnalysis() const;
// dumpPassStructure - Implement the -debug-passes=PassStructure option
void dumpPass(unsigned Offset = 0);
virtual void dumpPassStructure(unsigned Offset = 0);
// lookupPassInfo - Return the pass info object for the specified pass class,
// or null if it is not known.

View File

@ -362,9 +362,6 @@ public:
InheritedAnalysis[Index++] = (*I)->getAvailableAnalysis();
}
/// dumpPassStructure - Implement the -debug-passes=PassStructure option.
virtual void dumpPassStructure(unsigned Offset) = 0;
protected:
// Top level manager.

View File

@ -73,7 +73,7 @@ public:
errs().indent(Offset*2) << "Call Graph SCC Pass Manager\n";
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
Pass *P = getContainedPass(Index);
P->dumpPass(Offset + 1);
P->dumpPassStructure(Offset + 1);
dumpLastUses(P, Offset+1);
}
}

View File

@ -332,7 +332,7 @@ void LPPassManager::dumpPassStructure(unsigned Offset) {
errs().indent(Offset*2) << "Loop Pass Manager\n";
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
Pass *P = getContainedPass(Index);
P->dumpPass(Offset + 1);
P->dumpPassStructure(Offset + 1);
dumpLastUses(P, Offset+1);
}
}

View File

@ -48,8 +48,8 @@ bool Pass::mustPreserveAnalysisID(char &AID) const {
return Resolver->getAnalysisIfAvailable(&AID, true) != 0;
}
// dumpPass - Implement the -debug-passes=Structure option
void Pass::dumpPass(unsigned Offset) {
// dumpPassStructure - Implement the -debug-passes=Structure option
void Pass::dumpPassStructure(unsigned Offset) {
dbgs().indent(Offset*2) << getPassName() << "\n";
}

View File

@ -192,7 +192,7 @@ public:
llvm::dbgs() << std::string(Offset*2, ' ') << "BasicBlockPass Manager\n";
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
BasicBlockPass *BP = getContainedPass(Index);
BP->dumpPass(Offset + 1);
BP->dumpPassStructure(Offset + 1);
dumpLastUses(BP, Offset+1);
}
}
@ -286,11 +286,6 @@ public:
FPPassManager *FP = static_cast<FPPassManager *>(PassManagers[N]);
return FP;
}
/// dumpPassStructure - Implement the -debug-passes=PassStructure option.
void dumpPassStructure(unsigned) {
llvm_unreachable("dumpPassStructure called on FunctionPassManagerImpl");
}
};
char FunctionPassManagerImpl::ID = 0;
@ -353,7 +348,7 @@ public:
llvm::dbgs() << std::string(Offset*2, ' ') << "ModulePass Manager\n";
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
ModulePass *MP = getContainedPass(Index);
MP->dumpPass(Offset + 1);
MP->dumpPassStructure(Offset + 1);
std::map<Pass *, FunctionPassManagerImpl *>::const_iterator I =
OnTheFlyManagers.find(MP);
if (I != OnTheFlyManagers.end())
@ -437,11 +432,6 @@ public:
MPPassManager *MP = static_cast<MPPassManager *>(PassManagers[N]);
return MP;
}
/// dumpPassStructure - Implement the -debug-passes=PassStructure option.
void dumpPassStructure(unsigned) {
llvm_unreachable("dumpPassStructure called on PassManagerImpl");
}
};
char PassManagerImpl::ID = 0;
@ -667,14 +657,16 @@ void PMTopLevelManager::dumpPasses() const {
// Print out the immutable passes
for (unsigned i = 0, e = ImmutablePasses.size(); i != e; ++i) {
ImmutablePasses[i]->dumpPass();
ImmutablePasses[i]->dumpPassStructure(0);
}
// Print out the normal passes. We add an extra layer of indentation here
// to help distinguish them visually from the immutable passes.
// Every class that derives from PMDataManager also derives from Pass
// (sometimes indirectly), but there's no inheritance relationship
// between PMDataManager and Pass, so we have to getAsPass to get
// from a PMDataManager* to a Pass*.
for (SmallVector<PMDataManager *, 8>::const_iterator I = PassManagers.begin(),
E = PassManagers.end(); I != E; ++I)
(*I)->dumpPassStructure(1);
(*I)->getAsPass()->dumpPassStructure(1);
}
void PMTopLevelManager::dumpArguments() const {
@ -1049,7 +1041,7 @@ void PMDataManager::dumpLastUses(Pass *P, unsigned Offset) const{
for (SmallVector<Pass *, 12>::iterator I = LUses.begin(),
E = LUses.end(); I != E; ++I) {
llvm::dbgs() << "--" << std::string(Offset*2, ' ');
(*I)->dumpPass(0);
(*I)->dumpPassStructure(0);
}
}
@ -1417,7 +1409,7 @@ void FPPassManager::dumpPassStructure(unsigned Offset) {
llvm::dbgs() << std::string(Offset*2, ' ') << "FunctionPass Manager\n";
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
FunctionPass *FP = getContainedPass(Index);
FP->dumpPass(Offset + 1);
FP->dumpPassStructure(Offset + 1);
dumpLastUses(FP, Offset+1);
}
}