OSDN Git Service

Usage getAnalysisToUpdate for TargetData, per PR760.
authorDan Gohman <gohman@apple.com>
Tue, 21 Apr 2009 01:11:19 +0000 (01:11 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 21 Apr 2009 01:11:19 +0000 (01:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69645 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ScalarEvolution.cpp

index e429697..5300dbe 100644 (file)
@@ -3272,7 +3272,7 @@ SCEVHandle SCEVAddRecExpr::getNumIterationsInRange(ConstantRange Range,
 bool ScalarEvolution::runOnFunction(Function &F) {
   Impl = new ScalarEvolutionsImpl(*this, F,
                                   getAnalysis<LoopInfo>(),
-                                  &getAnalysis<TargetData>());
+                                  getAnalysisIfAvailable<TargetData>());
   return false;
 }
 
@@ -3284,7 +3284,6 @@ void ScalarEvolution::releaseMemory() {
 void ScalarEvolution::getAnalysisUsage(AnalysisUsage &AU) const {
   AU.setPreservesAll();
   AU.addRequiredTransitive<LoopInfo>();
-  AU.addRequiredTransitive<TargetData>();
 }
 
 bool ScalarEvolution::isSCEVable(const Type *Ty) const {