mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Introduce Simple Analysis interface for loop passes.
Right now, this interface provides hooks for only to operations, 1) clone basic block 2) delete value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40625 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -140,6 +140,27 @@ void LPPassManager::redoLoop(Loop *L) {
|
||||
redoThisLoop = true;
|
||||
}
|
||||
|
||||
/// cloneBasicBlockSimpleAnalysis - Invoke cloneBasicBlockAnalysis hook for
|
||||
/// all loop passes.
|
||||
void LPPassManager::cloneBasicBlockSimpleAnalysis(BasicBlock *From,
|
||||
BasicBlock *To, Loop *L) {
|
||||
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
|
||||
Pass *P = getContainedPass(Index);
|
||||
LoopPass *LP = dynamic_cast<LoopPass *>(P);
|
||||
LP->cloneBasicBlockAnalysis(From, To, L);
|
||||
}
|
||||
}
|
||||
|
||||
/// deleteSimpleAnalysisValue - Invoke deleteAnalysisValue hook for all passes.
|
||||
void LPPassManager::deleteSimpleAnalysisValue(Value *V, Loop *L) {
|
||||
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
|
||||
Pass *P = getContainedPass(Index);
|
||||
LoopPass *LP = dynamic_cast<LoopPass *>(P);
|
||||
LP->deleteAnalysisValue(V, L);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Recurse through all subloops and all loops into LQ.
|
||||
static void addLoopIntoQueue(Loop *L, std::deque<Loop *> &LQ) {
|
||||
LQ.push_back(L);
|
||||
|
Reference in New Issue
Block a user