1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-21 18:22:53 +01:00

[llvm] Use append_range (NFC)

This commit is contained in:
Kazu Hirata 2021-01-27 23:25:41 -08:00
parent 607e84883f
commit 2c90b2760d
9 changed files with 9 additions and 19 deletions

View File

@ -385,8 +385,7 @@ bool InterleavedAccess::lowerInterleavedLoad(
return !Extracts.empty() || BinOpShuffleChanged;
}
for (auto SVI : Shuffles)
DeadInsts.push_back(SVI);
append_range(DeadInsts, Shuffles);
DeadInsts.push_back(LI);
return true;

View File

@ -932,8 +932,7 @@ void VarLocBasedLDV::collectIDsForRegs(VarLocSet &Collected,
const VarLocSet &CollectFrom) const {
assert(!Regs.empty() && "Nothing to collect");
SmallVector<uint32_t, 32> SortedRegs;
for (Register Reg : Regs)
SortedRegs.push_back(Reg);
append_range(SortedRegs, Regs);
array_pod_sort(SortedRegs.begin(), SortedRegs.end());
auto It = CollectFrom.find(LocIndex::rawIndexForReg(SortedRegs.front()));
auto End = CollectFrom.end();

View File

@ -284,9 +284,7 @@ public:
/// vector.
static void FindPredecessorBlocks(MachineBasicBlock *BB,
SmallVectorImpl<MachineBasicBlock*> *Preds){
for (MachineBasicBlock::pred_iterator PI = BB->pred_begin(),
E = BB->pred_end(); PI != E; ++PI)
Preds->push_back(*PI);
append_range(*Preds, BB->predecessors());
}
/// GetUndefVal - Create an IMPLICIT_DEF instruction with a new register.

View File

@ -1022,8 +1022,7 @@ DWARFContext::DIEsForAddress DWARFContext::getDIEsForAddress(uint64_t Address) {
break;
}
for (auto Child : DIE)
Worklist.push_back(Child);
append_range(Worklist, DIE);
}
return Result;

View File

@ -892,8 +892,7 @@ CallInst *IRBuilderBase::CreateConstrainedFPCall(
Optional<fp::ExceptionBehavior> Except) {
llvm::SmallVector<Value *, 6> UseArgs;
for (auto *OneArg : Args)
UseArgs.push_back(OneArg);
append_range(UseArgs, Args);
bool HasRoundingMD = false;
switch (Callee->getIntrinsicID()) {
default:

View File

@ -350,8 +350,7 @@ static enum BaseType getBaseType(const Value *Val) {
// Push all the incoming values of phi node into the worklist for
// processing.
if (const auto *PN = dyn_cast<PHINode>(V)) {
for (Value *InV: PN->incoming_values())
Worklist.push_back(InV);
append_range(Worklist, PN->incoming_values());
continue;
}
if (const auto *SI = dyn_cast<SelectInst>(V)) {

View File

@ -21,8 +21,7 @@ BitstreamRemarkSerializerHelper::BitstreamRemarkSerializerHelper(
: Encoded(), R(), Bitstream(Encoded), ContainerType(ContainerType) {}
static void push(SmallVectorImpl<uint64_t> &R, StringRef Str) {
for (const char C : Str)
R.push_back(C);
append_range(R, Str);
}
static void setRecordName(unsigned RecordID, BitstreamWriter &Bitstream,

View File

@ -296,8 +296,7 @@ void HexagonSplitDoubleRegs::partitionRegisters(UUSetMap &P2Rs) {
Visited.insert(T);
// Add all registers associated with T.
USet &Asc = AssocMap[T];
for (USet::iterator J = Asc.begin(), F = Asc.end(); J != F; ++J)
WorkQ.push_back(*J);
append_range(WorkQ, Asc);
}
}

View File

@ -2051,8 +2051,7 @@ void DFSanVisitor::visitCallBase(CallBase &CB) {
Args.push_back(DFSF.LabelReturnAlloca);
}
for (i = CB.arg_begin() + FT->getNumParams(); i != CB.arg_end(); ++i)
Args.push_back(*i);
append_range(Args, drop_begin(CB.args(), FT->getNumParams()));
CallInst *CustomCI = IRB.CreateCall(CustomF, Args);
CustomCI->setCallingConv(CI->getCallingConv());