Rename getAnalysisToUpdate to getAnalysisIfAvailable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63198 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan Sands
2009-01-28 13:14:17 +00:00
parent e02f724880
commit 1465d61bdd
29 changed files with 87 additions and 85 deletions
+3 -3
View File
@@ -457,7 +457,7 @@ void LoopRotate::preserveCanonicalLoopForm(LPPassManager &LPM) {
"Expected only one incoming value from Original PreHeader");
}
if (DominatorTree *DT = getAnalysisToUpdate<DominatorTree>()) {
if (DominatorTree *DT = getAnalysisIfAvailable<DominatorTree>()) {
DT->addNewBlock(NewPreHeader, OrigPreHeader);
DT->changeImmediateDominator(L->getHeader(), NewPreHeader);
DT->changeImmediateDominator(Exit, OrigPreHeader);
@@ -473,7 +473,7 @@ void LoopRotate::preserveCanonicalLoopForm(LPPassManager &LPM) {
DT->changeImmediateDominator(OrigHeader, OrigLatch);
}
if (DominanceFrontier *DF = getAnalysisToUpdate<DominanceFrontier>()) {
if (DominanceFrontier *DF = getAnalysisIfAvailable<DominanceFrontier>()) {
// New Preheader's dominance frontier is Exit block.
DominanceFrontier::DomSetType NewPHSet;
NewPHSet.insert(Exit);
@@ -509,7 +509,7 @@ void LoopRotate::preserveCanonicalLoopForm(LPPassManager &LPM) {
// If a loop block dominates new loop latch then its frontier is
// new header and Exit.
BasicBlock *NewLatch = L->getLoopLatch();
DominatorTree *DT = getAnalysisToUpdate<DominatorTree>();
DominatorTree *DT = getAnalysisIfAvailable<DominatorTree>();
for (Loop::block_iterator BI = L->block_begin(), BE = L->block_end();
BI != BE; ++BI) {
BasicBlock *B = *BI;