mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
Make LoopPass::getContainedPass return a LoopPass* instead of a Pass*
and remove casts from all its callers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110848 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fa5c2a67c3
commit
bd4d66d56a
@ -104,10 +104,10 @@ public:
|
||||
/// Print passes managed by this manager
|
||||
void dumpPassStructure(unsigned Offset);
|
||||
|
||||
Pass *getContainedPass(unsigned N) {
|
||||
LoopPass *getContainedPass(unsigned N) {
|
||||
assert(N < PassVector.size() && "Pass number out of range!");
|
||||
Pass *FP = static_cast<Pass *>(PassVector[N]);
|
||||
return FP;
|
||||
LoopPass *LP = static_cast<LoopPass *>(PassVector[N]);
|
||||
return LP;
|
||||
}
|
||||
|
||||
virtual PassManagerType getPassManagerType() const {
|
||||
|
@ -183,7 +183,7 @@ void LPPassManager::redoLoop(Loop *L) {
|
||||
void LPPassManager::cloneBasicBlockSimpleAnalysis(BasicBlock *From,
|
||||
BasicBlock *To, Loop *L) {
|
||||
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
|
||||
LoopPass *LP = (LoopPass *)getContainedPass(Index);
|
||||
LoopPass *LP = getContainedPass(Index);
|
||||
LP->cloneBasicBlockAnalysis(From, To, L);
|
||||
}
|
||||
}
|
||||
@ -198,7 +198,7 @@ void LPPassManager::deleteSimpleAnalysisValue(Value *V, Loop *L) {
|
||||
}
|
||||
}
|
||||
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
|
||||
LoopPass *LP = (LoopPass *)getContainedPass(Index);
|
||||
LoopPass *LP = getContainedPass(Index);
|
||||
LP->deleteAnalysisValue(V, L);
|
||||
}
|
||||
}
|
||||
@ -240,7 +240,7 @@ bool LPPassManager::runOnFunction(Function &F) {
|
||||
I != E; ++I) {
|
||||
Loop *L = *I;
|
||||
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
|
||||
LoopPass *P = (LoopPass*)getContainedPass(Index);
|
||||
LoopPass *P = getContainedPass(Index);
|
||||
Changed |= P->doInitialization(L, *this);
|
||||
}
|
||||
}
|
||||
@ -254,7 +254,7 @@ bool LPPassManager::runOnFunction(Function &F) {
|
||||
|
||||
// Run all passes on the current Loop.
|
||||
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
|
||||
LoopPass *P = (LoopPass*)getContainedPass(Index);
|
||||
LoopPass *P = getContainedPass(Index);
|
||||
|
||||
dumpPassInfo(P, EXECUTION_MSG, ON_LOOP_MSG,
|
||||
CurrentLoop->getHeader()->getName());
|
||||
@ -320,7 +320,7 @@ bool LPPassManager::runOnFunction(Function &F) {
|
||||
|
||||
// Finalization
|
||||
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
|
||||
LoopPass *P = (LoopPass *)getContainedPass(Index);
|
||||
LoopPass *P = getContainedPass(Index);
|
||||
Changed |= P->doFinalization();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user