As the extension list continues to grow it probably makes sense
to use a binary search rather than linear search. Sorting the strings
will make this possible.
This also avoids any question about where to add new strings in
the tables.
Paths
| Differential D153170
[RISCV] Sort the extensions in SupportedExtensions and SupportedExperimentalExtensions. ClosedPublic Authored by craig.topper on Jun 16 2023, 2:22 PM.
Details Summary As the extension list continues to grow it probably makes sense This also avoids any question about where to add new strings in
Diff Detail
Event TimelineHerald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 16 2023, 2:22 PM This revision is now accepted and ready to land.Jun 22 2023, 6:55 AM Comment Actions
Yeah. I was going to do it when I made use of the sorted property, but it makes more sense to be in this patch. I'll probably do it for asserts builds for a better chance of people catching the error before it goes to the build bots. Comment Actions Verify the table is sorted. This uses the same pattern we use to check sorted tables in other places like X86InstrFMA3Info.cpp. Comment Actions OK, if this patch is going to verify the table is sorted then SupportedExtensions and SupportedExperimentalExtensions probably deserve a comment to explicitly note they must be kept in sort order. Otherwise, still LGTM. This revision was landed with ongoing or failed builds.Jun 22 2023, 11:26 AM Closed by commit rGe4a93d80f425: [RISCV] Sort the extensions in SupportedExtensions and… (authored by craig.topper). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 533706 clang/test/Driver/riscv-march-mcpu-mtune.c
llvm/lib/Support/RISCVISAInfo.cpp
|