diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2016-11-13 06:59:50 +0000 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2016-11-13 06:59:50 +0000 |
| commit | 8dff03911c5efa7a3abd6fb43f09233758075b20 (patch) | |
| tree | 6e2895171854b8e5db38f2e52022888a930e1825 /llvm/lib/Transforms/Scalar/NaryReassociate.cpp | |
| parent | 9ef5a8c501bfe3e28a24b235b1d097d17f86f3fe (diff) | |
| download | bcm5719-llvm-8dff03911c5efa7a3abd6fb43f09233758075b20.tar.gz bcm5719-llvm-8dff03911c5efa7a3abd6fb43f09233758075b20.zip | |
Analysis: Simplify the ScalarEvolution::getGEPExpr() interface. NFCI.
All existing callers were manually extracting information out of an existing
GEP instruction and passing it to getGEPExpr(). Simplify the interface by
changing it to take a GEPOperator instead.
llvm-svn: 286751
Diffstat (limited to 'llvm/lib/Transforms/Scalar/NaryReassociate.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/NaryReassociate.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/NaryReassociate.cpp b/llvm/lib/Transforms/Scalar/NaryReassociate.cpp index e2081f7bb8f..81744c08cd3 100644 --- a/llvm/lib/Transforms/Scalar/NaryReassociate.cpp +++ b/llvm/lib/Transforms/Scalar/NaryReassociate.cpp @@ -354,9 +354,8 @@ NaryReassociatePass::tryReassociateGEPAtIndex(GetElementPtrInst *GEP, IndexExprs[I] = SE->getZeroExtendExpr(IndexExprs[I], GEP->getOperand(I)->getType()); } - const SCEV *CandidateExpr = SE->getGEPExpr( - GEP->getSourceElementType(), SE->getSCEV(GEP->getPointerOperand()), - IndexExprs, GEP->isInBounds()); + const SCEV *CandidateExpr = SE->getGEPExpr(cast<GEPOperator>(GEP), + IndexExprs); Value *Candidate = findClosestMatchingDominator(CandidateExpr, GEP); if (Candidate == nullptr) |

