Skip to content

Commit

Permalink
[TableGen][RISCV] Strip experimental- prefix in profile names in Supp…
Browse files Browse the repository at this point in the history
…ortedExperimentalProfiles

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.
  • Loading branch information
asb committed May 14, 2024
1 parent ecce5cc commit 4014e2e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion llvm/test/TableGen/riscv-target-def.td
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def ROCKET : RISCVTuneProcessorModel<"rocket",
// CHECK-NEXT: };

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

// CHECK: #endif // GET_SUPPORTED_PROFILES
Expand Down
4 changes: 3 additions & 1 deletion llvm/utils/TableGen/RISCVTargetDefEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ static void printProfileTable(raw_ostream &OS,
if (Rec->getValueAsBit("Experimental") != Experimental)
continue;

OS.indent(4) << "{\"" << Rec->getValueAsString("Name") << "\",\"";
StringRef Name = Rec->getValueAsString("Name");
Name.consume_front("experimental-");
OS.indent(4) << "{\"" << Name << "\",\"";
printMArch(OS, Rec->getValueAsListOfDefs("Implies"));
OS << "\"},\n";
}
Expand Down

0 comments on commit 4014e2e

Please sign in to comment.