aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CodeGenPrepare.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2020-12-31 09:39:11 -0800
committerKazu Hirata <kazu@google.com>2020-12-31 09:39:11 -0800
commit7bc76fd0ec40ae20b6d456e2d6e7c328615ed718 (patch)
treefdc2ca1cea9b55be3be2dd83b1bb9af50057c0bc /llvm/lib/CodeGen/CodeGenPrepare.cpp
parentf904b46b1a965013a51854fafbb63763617e33b3 (diff)
downloadllvm-7bc76fd0ec40ae20b6d456e2d6e7c328615ed718.zip
llvm-7bc76fd0ec40ae20b6d456e2d6e7c328615ed718.tar.gz
llvm-7bc76fd0ec40ae20b6d456e2d6e7c328615ed718.tar.bz2
[CodeGen] Construct SmallVector with iterator ranges (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r--llvm/lib/CodeGen/CodeGenPrepare.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index 3ea758a..4a82c95 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -562,7 +562,7 @@ bool CodeGenPrepare::runOnFunction(Function &F) {
// are removed.
SmallSetVector<BasicBlock*, 8> WorkList;
for (BasicBlock &BB : F) {
- SmallVector<BasicBlock *, 2> Successors(succ_begin(&BB), succ_end(&BB));
+ SmallVector<BasicBlock *, 2> Successors(successors(&BB));
MadeChange |= ConstantFoldTerminator(&BB, true);
if (!MadeChange) continue;
@@ -576,7 +576,7 @@ bool CodeGenPrepare::runOnFunction(Function &F) {
MadeChange |= !WorkList.empty();
while (!WorkList.empty()) {
BasicBlock *BB = WorkList.pop_back_val();
- SmallVector<BasicBlock*, 2> Successors(succ_begin(BB), succ_end(BB));
+ SmallVector<BasicBlock*, 2> Successors(successors(BB));
DeleteDeadBlock(BB);
@@ -5328,7 +5328,7 @@ bool CodeGenPrepare::optimizeGatherScatterInst(Instruction *MemoryInst,
if (MemoryInst->getParent() != GEP->getParent())
return false;
- SmallVector<Value *, 2> Ops(GEP->op_begin(), GEP->op_end());
+ SmallVector<Value *, 2> Ops(GEP->operands());
bool RewriteGEP = false;