diff options
author | Serguei Katkov <serguei.katkov@azul.com> | 2019-07-09 04:20:43 +0000 |
---|---|---|
committer | Serguei Katkov <serguei.katkov@azul.com> | 2019-07-09 04:20:43 +0000 |
commit | c6caddb73d421538b0df41a4c19564c166384ffc (patch) | |
tree | 9f0b7357957af331e7b49ea06fef4141e3036a5f /llvm/lib/Transforms/Scalar/LoopPredication.cpp | |
parent | e085b40e9c4e5e4ebfbd0f98da17b77dec908bf7 (diff) | |
download | llvm-c6caddb73d421538b0df41a4c19564c166384ffc.zip llvm-c6caddb73d421538b0df41a4c19564c166384ffc.tar.gz llvm-c6caddb73d421538b0df41a4c19564c166384ffc.tar.bz2 |
[LoopInfo] Update getExitEdges to accept vector of pairs for non const BasicBlock
D63921 requires getExitEdges fills a vector of Edge pairs where
BasicBlocks are not constant.
The rest Loop API mostly returns non-const BasicBlocks, so to be more consistent with
other Loop API getExitEdges is modified to return non-const BasicBlocks as well.
This is an alternative solution to D64060.
Reviewers: reames, fhahn
Reviewed By: reames, fhahn
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D64309
llvm-svn: 365437
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopPredication.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopPredication.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopPredication.cpp b/llvm/lib/Transforms/Scalar/LoopPredication.cpp index a14c690..507a1e2 100644 --- a/llvm/lib/Transforms/Scalar/LoopPredication.cpp +++ b/llvm/lib/Transforms/Scalar/LoopPredication.cpp @@ -903,7 +903,7 @@ bool LoopPredication::isLoopProfitableToPredicate() { if (SkipProfitabilityChecks || !BPI) return true; - SmallVector<std::pair<const BasicBlock *, const BasicBlock *>, 8> ExitEdges; + SmallVector<std::pair<BasicBlock *, BasicBlock *>, 8> ExitEdges; L->getExitEdges(ExitEdges); // If there is only one exiting edge in the loop, it is always profitable to // predicate the loop. |