Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions llvm/lib/Analysis/IRSimilarityIdentifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ void IRInstructionData::initializeInstruction() {
// We capture the incoming BasicBlocks as values as well as the incoming
// Values in order to check for structural similarity.
if (PHINode *PN = dyn_cast<PHINode>(Inst))
for (BasicBlock *BB : PN->blocks())
OperVals.push_back(BB);
llvm::append_range(OperVals, PN->blocks());
}

IRInstructionData::IRInstructionData(IRInstructionDataList &IDList)
Expand Down
7 changes: 2 additions & 5 deletions llvm/lib/Analysis/IVDescriptors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1296,11 +1296,8 @@ InductionDescriptor::InductionDescriptor(Value *Start, InductionKind K,
InductionBinOp->getOpcode() == Instruction::FSub))) &&
"Binary opcode should be specified for FP induction");

if (Casts) {
for (auto &Inst : *Casts) {
RedundantCasts.push_back(Inst);
}
}
if (Casts)
llvm::append_range(RedundantCasts, *Casts);
}

ConstantInt *InductionDescriptor::getConstIntStepValue() const {
Expand Down
3 changes: 1 addition & 2 deletions llvm/lib/Analysis/LoopAccessAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -913,8 +913,7 @@ static void visitPointers(Value *StartPtr, const Loop &InnermostLoop,
// value.
if (PN && InnermostLoop.contains(PN->getParent()) &&
PN->getParent() != InnermostLoop.getHeader()) {
for (const Use &Inc : PN->incoming_values())
WorkList.push_back(Inc);
llvm::append_range(WorkList, PN->incoming_values());
} else
AddPointer(Ptr);
}
Expand Down
9 changes: 3 additions & 6 deletions llvm/lib/Analysis/ScalarEvolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4221,8 +4221,7 @@ bool ScalarEvolution::canReuseInstruction(
if (I->hasPoisonGeneratingAnnotations())
DropPoisonGeneratingInsts.push_back(I);

for (Value *Op : I->operands())
Worklist.push_back(Op);
llvm::append_range(Worklist, I->operands());
}
return true;
}
Expand Down Expand Up @@ -7622,8 +7621,7 @@ ScalarEvolution::getOperandsToCreate(Value *V, SmallVectorImpl<Value *> &Ops) {
case Instruction::GetElementPtr:
assert(cast<GEPOperator>(U)->getSourceElementType()->isSized() &&
"GEP source element type must be sized");
for (Value *Index : U->operands())
Ops.push_back(Index);
llvm::append_range(Ops, U->operands());
return nullptr;

case Instruction::IntToPtr:
Expand Down Expand Up @@ -7656,8 +7654,7 @@ ScalarEvolution::getOperandsToCreate(Value *V, SmallVectorImpl<Value *> &Ops) {
if (CanSimplifyToUnknown())
return getUnknown(U);

for (Value *Inc : U->operands())
Ops.push_back(Inc);
llvm::append_range(Ops, U->operands());
return nullptr;
break;
}
Expand Down