mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-18 06:38:41 +00:00
Revert r111199; it breaks -debug-pass=Structure output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111500 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e81043a7df
commit
8a757aeac4
@ -163,7 +163,7 @@ public:
|
|||||||
virtual void verifyAnalysis() const;
|
virtual void verifyAnalysis() const;
|
||||||
|
|
||||||
// dumpPassStructure - Implement the -debug-passes=PassStructure option
|
// 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,
|
// lookupPassInfo - Return the pass info object for the specified pass class,
|
||||||
// or null if it is not known.
|
// or null if it is not known.
|
||||||
|
@ -362,9 +362,6 @@ public:
|
|||||||
InheritedAnalysis[Index++] = (*I)->getAvailableAnalysis();
|
InheritedAnalysis[Index++] = (*I)->getAvailableAnalysis();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// dumpPassStructure - Implement the -debug-passes=PassStructure option.
|
|
||||||
virtual void dumpPassStructure(unsigned Offset) = 0;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Top level manager.
|
// Top level manager.
|
||||||
|
@ -73,7 +73,7 @@ public:
|
|||||||
errs().indent(Offset*2) << "Call Graph SCC Pass Manager\n";
|
errs().indent(Offset*2) << "Call Graph SCC Pass Manager\n";
|
||||||
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
|
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
|
||||||
Pass *P = getContainedPass(Index);
|
Pass *P = getContainedPass(Index);
|
||||||
P->dumpPass(Offset + 1);
|
P->dumpPassStructure(Offset + 1);
|
||||||
dumpLastUses(P, Offset+1);
|
dumpLastUses(P, Offset+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -332,7 +332,7 @@ void LPPassManager::dumpPassStructure(unsigned Offset) {
|
|||||||
errs().indent(Offset*2) << "Loop Pass Manager\n";
|
errs().indent(Offset*2) << "Loop Pass Manager\n";
|
||||||
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
|
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
|
||||||
Pass *P = getContainedPass(Index);
|
Pass *P = getContainedPass(Index);
|
||||||
P->dumpPass(Offset + 1);
|
P->dumpPassStructure(Offset + 1);
|
||||||
dumpLastUses(P, Offset+1);
|
dumpLastUses(P, Offset+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,8 +48,8 @@ bool Pass::mustPreserveAnalysisID(char &AID) const {
|
|||||||
return Resolver->getAnalysisIfAvailable(&AID, true) != 0;
|
return Resolver->getAnalysisIfAvailable(&AID, true) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// dumpPass - Implement the -debug-passes=Structure option
|
// dumpPassStructure - Implement the -debug-passes=Structure option
|
||||||
void Pass::dumpPass(unsigned Offset) {
|
void Pass::dumpPassStructure(unsigned Offset) {
|
||||||
dbgs().indent(Offset*2) << getPassName() << "\n";
|
dbgs().indent(Offset*2) << getPassName() << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ public:
|
|||||||
llvm::dbgs() << std::string(Offset*2, ' ') << "BasicBlockPass Manager\n";
|
llvm::dbgs() << std::string(Offset*2, ' ') << "BasicBlockPass Manager\n";
|
||||||
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
|
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
|
||||||
BasicBlockPass *BP = getContainedPass(Index);
|
BasicBlockPass *BP = getContainedPass(Index);
|
||||||
BP->dumpPass(Offset + 1);
|
BP->dumpPassStructure(Offset + 1);
|
||||||
dumpLastUses(BP, Offset+1);
|
dumpLastUses(BP, Offset+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -286,11 +286,6 @@ public:
|
|||||||
FPPassManager *FP = static_cast<FPPassManager *>(PassManagers[N]);
|
FPPassManager *FP = static_cast<FPPassManager *>(PassManagers[N]);
|
||||||
return FP;
|
return FP;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// dumpPassStructure - Implement the -debug-passes=PassStructure option.
|
|
||||||
void dumpPassStructure(unsigned) {
|
|
||||||
llvm_unreachable("dumpPassStructure called on FunctionPassManagerImpl");
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
char FunctionPassManagerImpl::ID = 0;
|
char FunctionPassManagerImpl::ID = 0;
|
||||||
@ -353,7 +348,7 @@ public:
|
|||||||
llvm::dbgs() << std::string(Offset*2, ' ') << "ModulePass Manager\n";
|
llvm::dbgs() << std::string(Offset*2, ' ') << "ModulePass Manager\n";
|
||||||
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
|
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
|
||||||
ModulePass *MP = getContainedPass(Index);
|
ModulePass *MP = getContainedPass(Index);
|
||||||
MP->dumpPass(Offset + 1);
|
MP->dumpPassStructure(Offset + 1);
|
||||||
std::map<Pass *, FunctionPassManagerImpl *>::const_iterator I =
|
std::map<Pass *, FunctionPassManagerImpl *>::const_iterator I =
|
||||||
OnTheFlyManagers.find(MP);
|
OnTheFlyManagers.find(MP);
|
||||||
if (I != OnTheFlyManagers.end())
|
if (I != OnTheFlyManagers.end())
|
||||||
@ -437,11 +432,6 @@ public:
|
|||||||
MPPassManager *MP = static_cast<MPPassManager *>(PassManagers[N]);
|
MPPassManager *MP = static_cast<MPPassManager *>(PassManagers[N]);
|
||||||
return MP;
|
return MP;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// dumpPassStructure - Implement the -debug-passes=PassStructure option.
|
|
||||||
void dumpPassStructure(unsigned) {
|
|
||||||
llvm_unreachable("dumpPassStructure called on PassManagerImpl");
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
char PassManagerImpl::ID = 0;
|
char PassManagerImpl::ID = 0;
|
||||||
@ -667,14 +657,16 @@ void PMTopLevelManager::dumpPasses() const {
|
|||||||
|
|
||||||
// Print out the immutable passes
|
// Print out the immutable passes
|
||||||
for (unsigned i = 0, e = ImmutablePasses.size(); i != e; ++i) {
|
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
|
// Every class that derives from PMDataManager also derives from Pass
|
||||||
// to help distinguish them visually from the immutable passes.
|
// (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(),
|
for (SmallVector<PMDataManager *, 8>::const_iterator I = PassManagers.begin(),
|
||||||
E = PassManagers.end(); I != E; ++I)
|
E = PassManagers.end(); I != E; ++I)
|
||||||
(*I)->dumpPassStructure(1);
|
(*I)->getAsPass()->dumpPassStructure(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PMTopLevelManager::dumpArguments() const {
|
void PMTopLevelManager::dumpArguments() const {
|
||||||
@ -1049,7 +1041,7 @@ void PMDataManager::dumpLastUses(Pass *P, unsigned Offset) const{
|
|||||||
for (SmallVector<Pass *, 12>::iterator I = LUses.begin(),
|
for (SmallVector<Pass *, 12>::iterator I = LUses.begin(),
|
||||||
E = LUses.end(); I != E; ++I) {
|
E = LUses.end(); I != E; ++I) {
|
||||||
llvm::dbgs() << "--" << std::string(Offset*2, ' ');
|
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";
|
llvm::dbgs() << std::string(Offset*2, ' ') << "FunctionPass Manager\n";
|
||||||
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
|
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
|
||||||
FunctionPass *FP = getContainedPass(Index);
|
FunctionPass *FP = getContainedPass(Index);
|
||||||
FP->dumpPass(Offset + 1);
|
FP->dumpPassStructure(Offset + 1);
|
||||||
dumpLastUses(FP, Offset+1);
|
dumpLastUses(FP, Offset+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user