aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CodeGenPrepare.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-01-21 19:59:46 -0800
committerKazu Hirata <kazu@google.com>2021-01-21 19:59:46 -0800
commitc5c4dbd2790736008b1c60f1b737dfb824b90144 (patch)
tree8eb24ba69e06b2741d154bb072778725d79ea587 /llvm/lib/CodeGen/CodeGenPrepare.cpp
parentbe611431cd1f5c826a55b531db92a63e84323866 (diff)
downloadllvm-c5c4dbd2790736008b1c60f1b737dfb824b90144.zip
llvm-c5c4dbd2790736008b1c60f1b737dfb824b90144.tar.gz
llvm-c5c4dbd2790736008b1c60f1b737dfb824b90144.tar.bz2
[CodeGen] Use llvm::append_range (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r--llvm/lib/CodeGen/CodeGenPrepare.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index c2fccab..b2bc75c 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -3714,8 +3714,7 @@ private:
PHINode::Create(CommonType, PredCount, "sunk_phi", CurrentPhi);
Map[Current] = PHI;
ST.insertNewPhi(PHI);
- for (Value *P : CurrentPhi->incoming_values())
- Worklist.push_back(P);
+ append_range(Worklist, CurrentPhi->incoming_values());
}
}
}
@@ -4969,8 +4968,7 @@ bool CodeGenPrepare::optimizeMemoryInst(Instruction *MemoryInst, Value *Addr,
// For a PHI node, push all of its incoming values.
if (PHINode *P = dyn_cast<PHINode>(V)) {
- for (Value *IncValue : P->incoming_values())
- worklist.push_back(IncValue);
+ append_range(worklist, P->incoming_values());
PhiOrSelectSeen = true;
continue;
}