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);
}
}
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;
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())
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;
AnalysisPass->getPotentialPassManagerType()) {
// Schedule analysis pass that is managed by a new manager.
schedulePass(AnalysisPass);
- // Recheck analysis passes to ensure that required analysises that
+ // Recheck analysis passes to ensure that required analyses that
// are already checked are still available.
checkAnalysis = true;
}
// 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 {
TransferLastUses.clear();
}
- // Now, take care of required analysises that are not available.
+ // Now, take care of required analyses that are not available.
for (SmallVector<AnalysisID, 8>::iterator
I = ReqAnalysisNotAvailable.begin(),
E = ReqAnalysisNotAvailable.end() ;I != E; ++I) {
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);
}
}
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);
}
}