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
16 changes: 4 additions & 12 deletions llvm/utils/TableGen/DXILEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,7 @@ DXILOperationDesc::DXILOperationDesc(const Record *R) {

ParamTypeRecs.push_back(R->getValueAsDef("result"));

for (const Record *ArgTy : R->getValueAsListOfDefs("arguments")) {
ParamTypeRecs.push_back(ArgTy);
}
llvm::append_range(ParamTypeRecs, R->getValueAsListOfDefs("arguments"));
size_t ParamTypeRecsSize = ParamTypeRecs.size();
// Populate OpTypes with return type and parameter types

Expand Down Expand Up @@ -148,9 +146,7 @@ DXILOperationDesc::DXILOperationDesc(const Record *R) {
// Sort records in ascending order of DXIL version
ascendingSortByVersion(Recs);

for (const Record *CR : Recs) {
OverloadRecs.push_back(CR);
}
llvm::append_range(OverloadRecs, Recs);

// Get stage records
Recs = R->getValueAsListOfDefs("stages");
Expand All @@ -163,19 +159,15 @@ DXILOperationDesc::DXILOperationDesc(const Record *R) {
// Sort records in ascending order of DXIL version
ascendingSortByVersion(Recs);

for (const Record *CR : Recs) {
StageRecs.push_back(CR);
}
llvm::append_range(StageRecs, Recs);

// Get attribute records
Recs = R->getValueAsListOfDefs("attributes");

// Sort records in ascending order of DXIL version
ascendingSortByVersion(Recs);

for (const Record *CR : Recs) {
AttrRecs.push_back(CR);
}
llvm::append_range(AttrRecs, Recs);

// Get the operation class
OpClass = R->getValueAsDef("OpClass")->getName();
Expand Down
12 changes: 4 additions & 8 deletions llvm/utils/TableGen/DecoderEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1342,8 +1342,7 @@ void FilterChooser::emitPredicateTableEntry(DecoderTableInfo &TableInfo,

TableInfo.Table.push_back(MCD::OPC_CheckPredicate);
// Predicate index.
for (const auto PB : PBytes)
TableInfo.Table.push_back(PB);
llvm::append_range(TableInfo.Table, PBytes);
// Push location for NumToSkip backpatching.
TableInfo.FixupStack.back().push_back(TableInfo.Table.size());
TableInfo.Table.push_back(0);
Expand Down Expand Up @@ -1402,15 +1401,13 @@ void FilterChooser::emitSoftFailTableEntry(DecoderTableInfo &TableInfo,
raw_svector_ostream S(MaskBytes);
if (NeedPositiveMask) {
encodeULEB128(PositiveMask.getZExtValue(), S);
for (unsigned i = 0, e = MaskBytes.size(); i != e; ++i)
TableInfo.Table.push_back(MaskBytes[i]);
llvm::append_range(TableInfo.Table, MaskBytes);
} else
TableInfo.Table.push_back(0);
if (NeedNegativeMask) {
MaskBytes.clear();
encodeULEB128(NegativeMask.getZExtValue(), S);
for (unsigned i = 0, e = MaskBytes.size(); i != e; ++i)
TableInfo.Table.push_back(MaskBytes[i]);
llvm::append_range(TableInfo.Table, MaskBytes);
} else
TableInfo.Table.push_back(0);
}
Expand Down Expand Up @@ -1483,8 +1480,7 @@ void FilterChooser::emitSingletonTableEntry(DecoderTableInfo &TableInfo,
encodeULEB128(DIdx, S);

// Decoder index.
for (const auto B : Bytes)
TableInfo.Table.push_back(B);
llvm::append_range(TableInfo.Table, Bytes);

if (!HasCompleteDecoder) {
// Push location for NumToSkip backpatching.
Expand Down
3 changes: 1 addition & 2 deletions llvm/utils/TableGen/X86DisassemblerTables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -746,8 +746,7 @@ void DisassemblerTables::emitModRMDecision(raw_ostream &o1, raw_ostream &o2,
ModRMDecision.push_back(decision.instructionIDs[index]);
break;
case MODRM_FULL:
for (unsigned short InstructionID : decision.instructionIDs)
ModRMDecision.push_back(InstructionID);
llvm::append_range(ModRMDecision, decision.instructionIDs);
break;
}

Expand Down
Loading