Skip to content

Commit

Permalink
[TableGen] Use a range-based for loop. NFC (#123443)
Browse files Browse the repository at this point in the history
  • Loading branch information
topperc authored Jan 18, 2025
1 parent 23746c2 commit 6628b59
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions llvm/utils/TableGen/Common/CodeGenSchedule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1581,22 +1581,16 @@ bool PredTransitions::substituteVariants(const PredTransition &Trans) {
// Visit each original write sequence.
for (const auto &WriteSequence : Trans.WriteSequences) {
// Push a new (empty) write sequence onto all partial Transitions.
for (std::vector<PredTransition>::iterator I = TransVec.begin() + StartIdx,
E = TransVec.end();
I != E; ++I) {
I->WriteSequences.emplace_back();
}
for (auto &PT : drop_begin(TransVec, StartIdx))
PT.WriteSequences.emplace_back();
Subst |=
substituteVariantOperand(WriteSequence, /*IsRead=*/false, StartIdx);
}
// Visit each original read sequence.
for (const auto &ReadSequence : Trans.ReadSequences) {
// Push a new (empty) read sequence onto all partial Transitions.
for (std::vector<PredTransition>::iterator I = TransVec.begin() + StartIdx,
E = TransVec.end();
I != E; ++I) {
I->ReadSequences.emplace_back();
}
for (auto &PT : drop_begin(TransVec, StartIdx))
PT.ReadSequences.emplace_back();
Subst |= substituteVariantOperand(ReadSequence, /*IsRead=*/true, StartIdx);
}
return Subst;
Expand Down

0 comments on commit 6628b59

Please sign in to comment.