Skip to content

Commit 3b927fa

Browse files
committed
[𝘀𝗽𝗿] changes to main this commit is based on
Created using spr 1.3.4 [skip ci]
1 parent 59b6c1b commit 3b927fa

File tree

4 files changed

+12
-25
lines changed

4 files changed

+12
-25
lines changed

llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2461,7 +2461,8 @@ bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) {
24612461
ValueTypeByHwMode VVT = TP.getInfer().getConcrete(Types[0], false);
24622462
for (auto &P : VVT) {
24632463
MVT::SimpleValueType VT = P.second.SimpleTy;
2464-
if (VT == MVT::iPTR || VT == MVT::iPTRAny)
2464+
// Can only check for types of a known size
2465+
if (VT == MVT::iPTR)
24652466
continue;
24662467
unsigned Size = MVT(VT).getFixedSizeInBits();
24672468
// Make sure that the value is representable for this type.

llvm/utils/TableGen/Common/CodeGenTarget.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,6 @@ MVT::SimpleValueType llvm::getValueType(const Record *Rec) {
4747
return (MVT::SimpleValueType)Rec->getValueAsInt("Value");
4848
}
4949

50-
StringRef llvm::getName(MVT::SimpleValueType T) {
51-
switch (T) {
52-
case MVT::Other:
53-
return "UNKNOWN";
54-
case MVT::iPTR:
55-
return "TLI.getPointerTy()";
56-
case MVT::iPTRAny:
57-
return "TLI.getPointerTy()";
58-
default:
59-
return getEnumName(T);
60-
}
61-
}
62-
6350
StringRef llvm::getEnumName(MVT::SimpleValueType T) {
6451
// clang-format off
6552
switch (T) {

llvm/utils/TableGen/Common/CodeGenTarget.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ class CodeGenSubRegIndex;
4646
/// record corresponds to.
4747
MVT::SimpleValueType getValueType(const Record *Rec);
4848

49-
StringRef getName(MVT::SimpleValueType T);
5049
StringRef getEnumName(MVT::SimpleValueType T);
5150

5251
/// getQualifiedName - Return the name of the specified record, with a

llvm/utils/TableGen/FastISelEmitter.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -718,19 +718,19 @@ void FastISelMap::printFunctionDefinitions(raw_ostream &OS) {
718718
const PredMap &PM = RI.second;
719719

720720
OS << "unsigned fastEmit_" << getLegalCName(Opcode) << "_"
721-
<< getLegalCName(std::string(getName(VT))) << "_"
722-
<< getLegalCName(std::string(getName(RetVT))) << "_";
721+
<< getLegalCName(std::string(getEnumName(VT))) << "_"
722+
<< getLegalCName(std::string(getEnumName(RetVT))) << "_";
723723
Operands.PrintManglingSuffix(OS, ImmediatePredicates);
724724
OS << "(";
725725
Operands.PrintParameters(OS);
726726
OS << ") {\n";
727727

728-
emitInstructionCode(OS, Operands, PM, std::string(getName(RetVT)));
728+
emitInstructionCode(OS, Operands, PM, std::string(getEnumName(RetVT)));
729729
}
730730

731731
// Emit one function for the type that demultiplexes on return type.
732732
OS << "unsigned fastEmit_" << getLegalCName(Opcode) << "_"
733-
<< getLegalCName(std::string(getName(VT))) << "_";
733+
<< getLegalCName(std::string(getEnumName(VT))) << "_";
734734
Operands.PrintManglingSuffix(OS, ImmediatePredicates);
735735
OS << "(MVT RetVT";
736736
if (!Operands.empty())
@@ -739,10 +739,10 @@ void FastISelMap::printFunctionDefinitions(raw_ostream &OS) {
739739
OS << ") {\nswitch (RetVT.SimpleTy) {\n";
740740
for (const auto &RI : RM) {
741741
MVT::SimpleValueType RetVT = RI.first;
742-
OS << " case " << getName(RetVT) << ": return fastEmit_"
742+
OS << " case " << getEnumName(RetVT) << ": return fastEmit_"
743743
<< getLegalCName(Opcode) << "_"
744-
<< getLegalCName(std::string(getName(VT))) << "_"
745-
<< getLegalCName(std::string(getName(RetVT))) << "_";
744+
<< getLegalCName(std::string(getEnumName(VT))) << "_"
745+
<< getLegalCName(std::string(getEnumName(RetVT))) << "_";
746746
Operands.PrintManglingSuffix(OS, ImmediatePredicates);
747747
OS << "(";
748748
Operands.PrintArguments(OS);
@@ -753,15 +753,15 @@ void FastISelMap::printFunctionDefinitions(raw_ostream &OS) {
753753
} else {
754754
// Non-variadic return type.
755755
OS << "unsigned fastEmit_" << getLegalCName(Opcode) << "_"
756-
<< getLegalCName(std::string(getName(VT))) << "_";
756+
<< getLegalCName(std::string(getEnumName(VT))) << "_";
757757
Operands.PrintManglingSuffix(OS, ImmediatePredicates);
758758
OS << "(MVT RetVT";
759759
if (!Operands.empty())
760760
OS << ", ";
761761
Operands.PrintParameters(OS);
762762
OS << ") {\n";
763763

764-
OS << " if (RetVT.SimpleTy != " << getName(RM.begin()->first)
764+
OS << " if (RetVT.SimpleTy != " << getEnumName(RM.begin()->first)
765765
<< ")\n return 0;\n";
766766

767767
const PredMap &PM = RM.begin()->second;
@@ -781,7 +781,7 @@ void FastISelMap::printFunctionDefinitions(raw_ostream &OS) {
781781
OS << " switch (VT.SimpleTy) {\n";
782782
for (const auto &TI : TM) {
783783
MVT::SimpleValueType VT = TI.first;
784-
std::string TypeName = std::string(getName(VT));
784+
std::string TypeName = std::string(getEnumName(VT));
785785
OS << " case " << TypeName << ": return fastEmit_"
786786
<< getLegalCName(Opcode) << "_" << getLegalCName(TypeName) << "_";
787787
Operands.PrintManglingSuffix(OS, ImmediatePredicates);

0 commit comments

Comments
 (0)