diff options
| author | Dan Gohman <gohman@apple.com> | 2009-12-14 17:02:34 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2009-12-14 17:02:34 +0000 |
| commit | d1d6f3708a558575396f8c066b9d9575889f8642 (patch) | |
| tree | 5bd27f64d8878c916a1833903513461b18c194b1 /lib/Transforms | |
| parent | 01c63bf35c8b7ff7775bc83a02a39fc2efcfe3f8 (diff) | |
| download | external_llvm-d1d6f3708a558575396f8c066b9d9575889f8642.zip external_llvm-d1d6f3708a558575396f8c066b9d9575889f8642.tar.gz external_llvm-d1d6f3708a558575396f8c066b9d9575889f8642.tar.bz2 | |
LSR itself doesn't need LoopInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91283 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
| -rw-r--r-- | lib/Transforms/Scalar/LoopStrengthReduce.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 3c8deac..dcbc9c2 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -27,7 +27,6 @@ #include "llvm/Type.h" #include "llvm/DerivedTypes.h" #include "llvm/Analysis/IVUsers.h" -#include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/LoopPass.h" #include "llvm/Analysis/ScalarEvolutionExpander.h" #include "llvm/Transforms/Utils/AddrModeMatcher.h" @@ -84,7 +83,6 @@ namespace { class LoopStrengthReduce : public LoopPass { IVUsers *IU; - LoopInfo *LI; ScalarEvolution *SE; bool Changed; @@ -115,12 +113,11 @@ namespace { // We split critical edges, so we change the CFG. However, we do update // many analyses if they are around. AU.addPreservedID(LoopSimplifyID); - AU.addPreserved<LoopInfo>(); + AU.addPreserved("loops"); AU.addPreserved("domfrontier"); AU.addPreserved("domtree"); AU.addRequiredID(LoopSimplifyID); - AU.addRequired<LoopInfo>(); AU.addRequired<ScalarEvolution>(); AU.addPreserved<ScalarEvolution>(); AU.addRequired<IVUsers>(); @@ -259,7 +256,7 @@ static bool containsAddRecFromDifferentLoop(const SCEV *S, Loop *L) { if (newLoop == L) return false; // if newLoop is an outer loop of L, this is OK. - if (!LoopInfo::isNotAlreadyContainedIn(L, newLoop)) + if (!newLoop->contains(L->getHeader())) return false; } return true; @@ -2720,7 +2717,6 @@ bool LoopStrengthReduce::OptimizeLoopCountIV(Loop *L) { bool LoopStrengthReduce::runOnLoop(Loop *L, LPPassManager &LPM) { IU = &getAnalysis<IVUsers>(); - LI = &getAnalysis<LoopInfo>(); SE = &getAnalysis<ScalarEvolution>(); Changed = false; |
