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
18 changes: 7 additions & 11 deletions llvm/lib/TableGen/Record.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,11 +334,10 @@ static const RecordRecTy *resolveRecordTypes(const RecordRecTy *T1,
while (!Stack.empty()) {
const Record *R = Stack.pop_back_val();

if (T2->isSubClassOf(R)) {
if (T2->isSubClassOf(R))
CommonSuperClasses.push_back(R);
} else {
append_range(Stack, make_first_range(R->getDirectSuperClasses()));
}
else
llvm::append_range(Stack, make_first_range(R->getDirectSuperClasses()));
}

return RecordRecTy::get(T1->getRecordKeeper(), CommonSuperClasses);
Expand Down Expand Up @@ -2733,11 +2732,8 @@ const DagInit *DagInit::get(const Init *V, const StringInit *VN,
const DagInit *DagInit::get(
const Init *V, const StringInit *VN,
ArrayRef<std::pair<const Init *, const StringInit *>> ArgAndNames) {
SmallVector<const Init *, 8> Args;
SmallVector<const StringInit *, 8> Names;

llvm::append_range(Args, make_first_range(ArgAndNames));
llvm::append_range(Names, make_second_range(ArgAndNames));
SmallVector<const Init *, 8> Args(make_first_range(ArgAndNames));
SmallVector<const StringInit *, 8> Names(make_second_range(ArgAndNames));
return DagInit::get(V, VN, Args, Names);
}

Expand Down Expand Up @@ -2901,8 +2897,8 @@ void Record::checkName() {
}

const RecordRecTy *Record::getType() const {
SmallVector<const Record *, 4> DirectSCs;
append_range(DirectSCs, make_first_range(getDirectSuperClasses()));
SmallVector<const Record *> DirectSCs(
make_first_range(getDirectSuperClasses()));
return RecordRecTy::get(TrackedRecords, DirectSCs);
}

Expand Down
3 changes: 1 addition & 2 deletions llvm/utils/TableGen/Common/CodeGenRegisters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -650,8 +650,7 @@ struct TupleExpander : SetTheory::Expander {

// Take the cost list of the first register in the tuple.
const ListInit *CostList = Proto->getValueAsListInit("CostPerUse");
SmallVector<const Init *, 2> CostPerUse;
llvm::append_range(CostPerUse, *CostList);
SmallVector<const Init *, 2> CostPerUse(CostList->getValues());

const StringInit *AsmName = StringInit::get(RK, "");
if (!RegNames.empty()) {
Expand Down