aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ScalarEvolution.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-03-29 16:52:36 -0700
committerGitHub <noreply@github.com>2025-03-29 16:52:36 -0700
commit8f5c3deadd79a19c8585e014581288e92462a97c (patch)
treef7af01b0d0103e608327370928a7eee88df8bc43 /llvm/lib/Analysis/ScalarEvolution.cpp
parent0c7be9392f1b8ab81be28d0ff1ebb374553ad70f (diff)
downloadllvm-8f5c3deadd79a19c8585e014581288e92462a97c.zip
llvm-8f5c3deadd79a19c8585e014581288e92462a97c.tar.gz
llvm-8f5c3deadd79a19c8585e014581288e92462a97c.tar.bz2
[Analysis] Use llvm::append_range (NFC) (#133602)
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 600a061..3612067 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -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;
}
@@ -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:
@@ -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;
}