diff options
author | Fangrui Song <maskray@google.com> | 2019-04-23 14:51:27 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-04-23 14:51:27 +0000 |
commit | efd94c56badf696ed7193f4a83c7a59f7dfbfc6e (patch) | |
tree | 63f7a8a57c367cf6ba845a80eda9177b62c516be /llvm/lib/Analysis/ScalarEvolutionExpander.cpp | |
parent | 99cf58339fceadee43ba3fdbf962a083cd5af6c4 (diff) | |
download | bcm5719-llvm-efd94c56badf696ed7193f4a83c7a59f7dfbfc6e.tar.gz bcm5719-llvm-efd94c56badf696ed7193f4a83c7a59f7dfbfc6e.zip |
Use llvm::stable_sort
While touching the code, simplify if feasible.
llvm-svn: 358996
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolutionExpander.cpp')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolutionExpander.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp b/llvm/lib/Analysis/ScalarEvolutionExpander.cpp index ccf031f7eae..a540cd622cf 100644 --- a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp +++ b/llvm/lib/Analysis/ScalarEvolutionExpander.cpp @@ -694,7 +694,7 @@ Value *SCEVExpander::visitAddExpr(const SCEVAddExpr *S) { // Sort by loop. Use a stable sort so that constants follow non-constants and // pointer operands precede non-pointer operands. - std::stable_sort(OpsAndLoops.begin(), OpsAndLoops.end(), LoopCompare(SE.DT)); + llvm::stable_sort(OpsAndLoops, LoopCompare(SE.DT)); // Emit instructions to add all the operands. Hoist as much as possible // out of loops, and form meaningful getelementptrs where possible. @@ -761,7 +761,7 @@ Value *SCEVExpander::visitMulExpr(const SCEVMulExpr *S) { OpsAndLoops.push_back(std::make_pair(getRelevantLoop(*I), *I)); // Sort by loop. Use a stable sort so that constants follow non-constants. - std::stable_sort(OpsAndLoops.begin(), OpsAndLoops.end(), LoopCompare(SE.DT)); + llvm::stable_sort(OpsAndLoops, LoopCompare(SE.DT)); // Emit instructions to mul all the operands. Hoist as much as possible // out of loops. |