mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[Analysis] Use llvm::append_range (NFC)
This commit is contained in:
parent
86074b81a9
commit
6fefce8f75
@ -152,7 +152,7 @@ private:
|
||||
setKind((InstList.size() == 0 && Input.size() == 1)
|
||||
? NodeKind::SingleInstruction
|
||||
: NodeKind::MultiInstruction);
|
||||
InstList.insert(InstList.end(), Input.begin(), Input.end());
|
||||
llvm::append_range(InstList, Input);
|
||||
}
|
||||
void appendInstructions(const SimpleDDGNode &Input) {
|
||||
appendInstructions(Input.getInstructions());
|
||||
|
@ -81,7 +81,7 @@ inline void addNodeToInterval(Interval *Int, BasicBlock *BB) {
|
||||
// BasicBlocks are added to the interval.
|
||||
inline void addNodeToInterval(Interval *Int, Interval *I) {
|
||||
// Add all of the nodes in I as new nodes in Int.
|
||||
Int->Nodes.insert(Int->Nodes.end(), I->Nodes.begin(), I->Nodes.end());
|
||||
llvm::append_range(Int->Nodes, I->Nodes);
|
||||
}
|
||||
|
||||
template<class NodeTy, class OrigContainer_t, class GT = GraphTraits<NodeTy *>,
|
||||
|
@ -83,7 +83,7 @@ void AliasSet::mergeSetIn(AliasSet &AS, AliasSetTracker &AST) {
|
||||
addRef();
|
||||
}
|
||||
} else if (ASHadUnknownInsts) {
|
||||
UnknownInsts.insert(UnknownInsts.end(), AS.UnknownInsts.begin(), AS.UnknownInsts.end());
|
||||
llvm::append_range(UnknownInsts, AS.UnknownInsts);
|
||||
AS.UnknownInsts.clear();
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ bool DDGNode::collectInstructions(
|
||||
assert(!isa<PiBlockDDGNode>(PN) && "Nested PiBlocks are not supported.");
|
||||
SmallVector<Instruction *, 8> TmpIList;
|
||||
PN->collectInstructions(Pred, TmpIList);
|
||||
IList.insert(IList.end(), TmpIList.begin(), TmpIList.end());
|
||||
llvm::append_range(IList, TmpIList);
|
||||
}
|
||||
} else
|
||||
llvm_unreachable("unimplemented type of node");
|
||||
|
@ -492,8 +492,7 @@ void AbstractDependenceGraphBuilder<G>::sortNodesTopologically() {
|
||||
// Put members of the pi-block right after the pi-block itself, for
|
||||
// convenience.
|
||||
const NodeListType &PiBlockMembers = getNodesInPiBlock(*N);
|
||||
NodesInPO.insert(NodesInPO.end(), PiBlockMembers.begin(),
|
||||
PiBlockMembers.end());
|
||||
llvm::append_range(NodesInPO, PiBlockMembers);
|
||||
}
|
||||
NodesInPO.push_back(N);
|
||||
}
|
||||
|
@ -138,10 +138,8 @@ void IRInstructionMapper::convertToUnsignedVec(
|
||||
mapToIllegalUnsigned(It, IntegerMappingForBB, InstrListForBB, true);
|
||||
for_each(InstrListForBB,
|
||||
[this](IRInstructionData *ID) { this->IDL->push_back(*ID); });
|
||||
InstrList.insert(InstrList.end(), InstrListForBB.begin(),
|
||||
InstrListForBB.end());
|
||||
IntegerMapping.insert(IntegerMapping.end(), IntegerMappingForBB.begin(),
|
||||
IntegerMappingForBB.end());
|
||||
llvm::append_range(InstrList, InstrListForBB);
|
||||
llvm::append_range(IntegerMapping, IntegerMappingForBB);
|
||||
}
|
||||
}
|
||||
|
||||
@ -639,11 +637,9 @@ void IRSimilarityIdentifier::populateMapper(
|
||||
|
||||
// Insert the InstrListForModule at the end of the overall InstrList so that
|
||||
// we can have a long InstrList for the entire set of Modules being analyzed.
|
||||
InstrList.insert(InstrList.end(), InstrListForModule.begin(),
|
||||
InstrListForModule.end());
|
||||
llvm::append_range(InstrList, InstrListForModule);
|
||||
// Do the same as above, but for IntegerMapping.
|
||||
IntegerMapping.insert(IntegerMapping.end(), IntegerMappingForModule.begin(),
|
||||
IntegerMappingForModule.end());
|
||||
llvm::append_range(IntegerMapping, IntegerMappingForModule);
|
||||
}
|
||||
|
||||
void IRSimilarityIdentifier::populateMapper(
|
||||
|
@ -333,7 +333,7 @@ void LazyValueInfoCache::threadEdgeImpl(BasicBlock *OldSucc,
|
||||
|
||||
if (!changed) continue;
|
||||
|
||||
worklist.insert(worklist.end(), succ_begin(ToUpdate), succ_end(ToUpdate));
|
||||
llvm::append_range(worklist, successors(ToUpdate));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11961,7 +11961,7 @@ void ScalarEvolution::SCEVCallbackVH::allUsesReplacedWith(Value *V) {
|
||||
if (PHINode *PN = dyn_cast<PHINode>(U))
|
||||
SE->ConstantEvolutionLoopExitValue.erase(PN);
|
||||
SE->eraseValueFromMap(U);
|
||||
Worklist.insert(Worklist.end(), U->user_begin(), U->user_end());
|
||||
llvm::append_range(Worklist, U->users());
|
||||
}
|
||||
// Delete the Old value.
|
||||
if (PHINode *PN = dyn_cast<PHINode>(Old))
|
||||
@ -12526,7 +12526,7 @@ void ScalarEvolution::verify() const {
|
||||
|
||||
while (!LoopStack.empty()) {
|
||||
auto *L = LoopStack.pop_back_val();
|
||||
LoopStack.insert(LoopStack.end(), L->begin(), L->end());
|
||||
llvm::append_range(LoopStack, *L);
|
||||
|
||||
auto *CurBECount = SCM.visit(
|
||||
const_cast<ScalarEvolution *>(this)->getBackedgeTakenCount(L));
|
||||
|
@ -1543,10 +1543,10 @@ static bool compareWithVectorFnName(const VecDesc &LHS, StringRef S) {
|
||||
}
|
||||
|
||||
void TargetLibraryInfoImpl::addVectorizableFunctions(ArrayRef<VecDesc> Fns) {
|
||||
VectorDescs.insert(VectorDescs.end(), Fns.begin(), Fns.end());
|
||||
llvm::append_range(VectorDescs, Fns);
|
||||
llvm::sort(VectorDescs, compareByScalarFnName);
|
||||
|
||||
ScalarDescs.insert(ScalarDescs.end(), Fns.begin(), Fns.end());
|
||||
llvm::append_range(ScalarDescs, Fns);
|
||||
llvm::sort(ScalarDescs, compareByVectorFnName);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user