[llvm] 643c00f - [TableGen] Use ListSeparator (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 3 20:41:58 PST 2021
Author: Kazu Hirata
Date: 2021-02-03T20:41:18-08:00
New Revision: 643c00f717a2cc20a85cdbfa3681e8f61af8c64f
URL: https://github.com/llvm/llvm-project/commit/643c00f717a2cc20a85cdbfa3681e8f61af8c64f
DIFF: https://github.com/llvm/llvm-project/commit/643c00f717a2cc20a85cdbfa3681e8f61af8c64f.diff
LOG: [TableGen] Use ListSeparator (NFC)
Added:
Modified:
llvm/utils/TableGen/CodeGenSchedule.cpp
Removed:
################################################################################
diff --git a/llvm/utils/TableGen/CodeGenSchedule.cpp b/llvm/utils/TableGen/CodeGenSchedule.cpp
index b20eb6eff422..14d0ee6d5565 100644
--- a/llvm/utils/TableGen/CodeGenSchedule.cpp
+++ b/llvm/utils/TableGen/CodeGenSchedule.cpp
@@ -2262,25 +2262,18 @@ void PredTransitions::dump() const {
for (std::vector<PredTransition>::const_iterator
TI = TransVec.begin(), TE = TransVec.end(); TI != TE; ++TI) {
dbgs() << "{";
- for (SmallVectorImpl<PredCheck>::const_iterator
- PCI = TI->PredTerm.begin(), PCE = TI->PredTerm.end();
- PCI != PCE; ++PCI) {
- if (PCI != TI->PredTerm.begin())
- dbgs() << ", ";
- dbgs() << SchedModels.getSchedRW(PCI->RWIdx, PCI->IsRead).Name
- << ":" << PCI->Predicate->getName();
- }
+ ListSeparator LS;
+ for (const PredCheck &PC : TI->PredTerm)
+ dbgs() << LS << SchedModels.getSchedRW(PC.RWIdx, PC.IsRead).Name << ":"
+ << PC.Predicate->getName();
dbgs() << "},\n => {";
for (SmallVectorImpl<SmallVector<unsigned,4>>::const_iterator
WSI = TI->WriteSequences.begin(), WSE = TI->WriteSequences.end();
WSI != WSE; ++WSI) {
dbgs() << "(";
- for (SmallVectorImpl<unsigned>::const_iterator
- WI = WSI->begin(), WE = WSI->end(); WI != WE; ++WI) {
- if (WI != WSI->begin())
- dbgs() << ", ";
- dbgs() << SchedModels.getSchedWrite(*WI).Name;
- }
+ ListSeparator LS;
+ for (unsigned N : *WSI)
+ dbgs() << LS << SchedModels.getSchedWrite(N).Name;
dbgs() << "),";
}
dbgs() << "}\n";
More information about the llvm-commits
mailing list