Skip to content

Commit 4014e2e

Browse files
committed
[TableGen][RISCV] Strip experimental- prefix in profile names in SupportedExperimentalProfiles
This matches what we do for extensions, and saves us having to do it in RISCVISAInfo. This is a minor tweak to what I added in #91993.
1 parent ecce5cc commit 4014e2e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

llvm/test/TableGen/riscv-target-def.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def ROCKET : RISCVTuneProcessorModel<"rocket",
147147
// CHECK-NEXT: };
148148

149149
// CHECK: static constexpr RISCVProfile SupportedExperimentalProfiles[] = {
150-
// CHECK-NEXT: {"experimental-rvi99u64","rv64i2p1"},
150+
// CHECK-NEXT: {"rvi99u64","rv64i2p1"},
151151
// CHECK-NEXT: };
152152

153153
// CHECK: #endif // GET_SUPPORTED_PROFILES

llvm/utils/TableGen/RISCVTargetDefEmitter.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ static void printProfileTable(raw_ostream &OS,
134134
if (Rec->getValueAsBit("Experimental") != Experimental)
135135
continue;
136136

137-
OS.indent(4) << "{\"" << Rec->getValueAsString("Name") << "\",\"";
137+
StringRef Name = Rec->getValueAsString("Name");
138+
Name.consume_front("experimental-");
139+
OS.indent(4) << "{\"" << Name << "\",\"";
138140
printMArch(OS, Rec->getValueAsListOfDefs("Implies"));
139141
OS << "\"},\n";
140142
}

0 commit comments

Comments
 (0)