This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] NFC tweaks in extension descriptions, sorting
ClosedPublic

Authored by ego on Apr 20 2023, 4:43 PM.

Details

Summary

NFC changes in RISCISAInfo and RISCFeatures, and matching updates to the MC tests.

Signed-off-by: Eric Gouriou <ego@rivosinc.com>

Diff Detail

Event Timeline

ego created this revision.Apr 20 2023, 4:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 20 2023, 4:43 PM
ego requested review of this revision.Apr 20 2023, 4:43 PM
asb added inline comments.Apr 21 2023, 8:16 AM
llvm/lib/Support/RISCVISAInfo.cpp
916–917

There is a canonical order for the single letter extensions (and for ordering those vs Z and X extensions). As such, I'd suggest:

  • Single letter extensions in canonical order (i.e. F then D then V).
  • Then a blank line, then the standard Z* extensions in alphabetical order
  • Then a blank line, then the standard X* extensions in alphabetical order

I don't feel too strongly about this, so if you have a strongly different view I'd be OK with just plain alphabetic order. But let me know what you think.

craig.topper added inline comments.
llvm/lib/Support/RISCVISAInfo.cpp
916–917

Alphabetical does make some sense here. These are all listed again in ImpliedExts which must me in alabetical order due to binary search.

asb accepted this revision.Apr 21 2023, 9:38 AM
asb added inline comments.
llvm/lib/Support/RISCVISAInfo.cpp
916–917

Good point, that makes sense.

This revision is now accepted and ready to land.Apr 21 2023, 9:38 AM
This revision was automatically updated to reflect the committed changes.