diff options
author | Xinliang David Li <davidxl@google.com> | 2016-07-01 05:59:55 +0000 |
---|---|---|
committer | Xinliang David Li <davidxl@google.com> | 2016-07-01 05:59:55 +0000 |
commit | 94734eef33591117476286b22dc2927c3626d35e (patch) | |
tree | 32fa0e8d282cfc77328ba7bcb27e88fdee775b7d /llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp | |
parent | 93926acbb2d8ca122df8fc47d96b90ebdeb0ade3 (diff) | |
download | bcm5719-llvm-94734eef33591117476286b22dc2927c3626d35e.tar.gz bcm5719-llvm-94734eef33591117476286b22dc2927c3626d35e.zip |
[PM] refactor LoopAccessInfo code part-2
Differential Revision: http://reviews.llvm.org/D21636
llvm-svn: 274334
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp b/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp index 1dd60995237..d37e2c374d6 100644 --- a/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp +++ b/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp @@ -129,7 +129,7 @@ class LoadEliminationForLoop { public: LoadEliminationForLoop(Loop *L, LoopInfo *LI, const LoopAccessInfo &LAI, DominatorTree *DT) - : L(L), LI(LI), LAI(LAI), DT(DT), PSE(LAI.PSE) {} + : L(L), LI(LI), LAI(LAI), DT(DT), PSE(LAI.getPSE()) {} /// \brief Look through the loop-carried and loop-independent dependences in /// this loop and find store->load dependences. @@ -486,13 +486,13 @@ public: return false; } - if (LAI.PSE.getUnionPredicate().getComplexity() > + if (LAI.getPSE().getUnionPredicate().getComplexity() > LoadElimSCEVCheckThreshold) { DEBUG(dbgs() << "Too many SCEV run-time checks needed.\n"); return false; } - if (!Checks.empty() || !LAI.PSE.getUnionPredicate().isAlwaysTrue()) { + if (!Checks.empty() || !LAI.getPSE().getUnionPredicate().isAlwaysTrue()) { if (L->getHeader()->getParent()->optForSize()) { DEBUG(dbgs() << "Versioning is needed but not allowed when optimizing " "for size.\n"); @@ -504,7 +504,7 @@ public: LoopVersioning LV(LAI, L, LI, DT, PSE.getSE(), false); LV.setAliasChecks(std::move(Checks)); - LV.setSCEVChecks(LAI.PSE.getUnionPredicate()); + LV.setSCEVChecks(LAI.getPSE().getUnionPredicate()); LV.versionLoop(); } |