diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-14 22:12:13 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-14 22:12:13 +0000 | 
| commit | f1a29dd3442304e183b0491fbe2d33f6c963069e (patch) | |
| tree | 64b5defb92948be8b09a6f1b5c48ec60abad1325 /contrib/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp | |
| parent | 8a6fe8ce60ab99778558c4951d23615a0141daf0 (diff) | |
| parent | 581a6d8501ff5614297da837b81ed3b6956361ea (diff) | |
Notes
Diffstat (limited to 'contrib/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp')
| -rw-r--r-- | contrib/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp | 20 | 
1 files changed, 5 insertions, 15 deletions
diff --git a/contrib/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp b/contrib/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp index f6620ad1ade5..69102d10ff60 100644 --- a/contrib/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp +++ b/contrib/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp @@ -18,7 +18,6 @@  #include "llvm/Analysis/InstructionSimplify.h"  #include "llvm/Analysis/LoopInfo.h"  #include "llvm/Analysis/LoopPass.h" -#include "llvm/Analysis/LoopPassManager.h"  #include "llvm/Analysis/ScalarEvolution.h"  #include "llvm/Analysis/TargetLibraryInfo.h"  #include "llvm/IR/DataLayout.h" @@ -26,6 +25,7 @@  #include "llvm/IR/Instructions.h"  #include "llvm/Support/Debug.h"  #include "llvm/Transforms/Scalar.h" +#include "llvm/Transforms/Scalar/LoopPassManager.h"  #include "llvm/Transforms/Utils/Local.h"  #include "llvm/Transforms/Utils/LoopUtils.h"  using namespace llvm; @@ -183,20 +183,10 @@ public:  };  } -PreservedAnalyses LoopInstSimplifyPass::run(Loop &L, -                                            LoopAnalysisManager &AM) { -  const auto &FAM = -      AM.getResult<FunctionAnalysisManagerLoopProxy>(L).getManager(); -  Function *F = L.getHeader()->getParent(); - -  // Use getCachedResult because Loop pass cannot trigger a function analysis. -  auto *DT = FAM.getCachedResult<DominatorTreeAnalysis>(*F); -  auto *LI = FAM.getCachedResult<LoopAnalysis>(*F); -  auto *AC = FAM.getCachedResult<AssumptionAnalysis>(*F); -  const auto *TLI = FAM.getCachedResult<TargetLibraryAnalysis>(*F); -  assert((LI && AC && TLI) && "Analyses for Loop Inst Simplify not available"); - -  if (!SimplifyLoopInst(&L, DT, LI, AC, TLI)) +PreservedAnalyses LoopInstSimplifyPass::run(Loop &L, LoopAnalysisManager &AM, +                                            LoopStandardAnalysisResults &AR, +                                            LPMUpdater &) { +  if (!SimplifyLoopInst(&L, &AR.DT, &AR.LI, &AR.AC, &AR.TLI))      return PreservedAnalyses::all();    return getLoopPassPreservedAnalyses();  | 
