Skip to content

Commit ab8ac36

Browse files
authored
[RISCV] Add list of supported profiles to -print-supported-extensions (#90757)
I tried also printing the -march they correspond to, but it seemed overly verbose and caused line wraps. It might be better if we remove the versions numbers from the string or did a more intelligent line wrap.
1 parent 4aca302 commit ab8ac36

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

llvm/lib/TargetParser/RISCVISAInfo.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ void llvm::riscvExtensionsHelp(StringMap<StringRef> DescMap) {
9898
PrintExtension(E.first, Version, DescMap["experimental-" + E.first]);
9999
}
100100

101+
outs() << "\nSupported Profiles\n";
102+
for (const auto &P : SupportedProfiles)
103+
outs().indent(4) << P.Name << "\n";
104+
101105
outs() << "\nUse -march to specify the target's extension.\n"
102106
"For example, clang -march=rv32i_v1p0\n";
103107
}

llvm/unittests/TargetParser/RISCVISAInfoTest.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -906,6 +906,19 @@ Experimental extensions
906906
ssqosid 1.0
907907
supm 0.8
908908
909+
Supported Profiles
910+
rva20s64
911+
rva20u64
912+
rva22s64
913+
rva22u64
914+
rva23s64
915+
rva23u64
916+
rvb23s64
917+
rvb23u64
918+
rvi20u32
919+
rvi20u64
920+
rvm23u32
921+
909922
Use -march to specify the target's extension.
910923
For example, clang -march=rv32i_v1p0)";
911924
// clang-format on

0 commit comments

Comments
 (0)