[PATCH] D148315: [RISCV] Modify arch string parsing order according to latest riscv spec

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 17 22:22:33 PDT 2023

asb accepted this revision.
asb added a comment.
This revision is now accepted and ready to land.

LGTM. I suppose a sensible follow-up patch would be to remove Sx altogether. I'm not aware of the prefix being used at all.

This specific patch only affects how we ingest ISA naming strings. The logic used for OrderedExtensionMap is separate, though looking at that seems to have an issue - it sorts S* then Z* then X*. I think this is probably due to misreading the table in the ISA manual (which I did when first composing this response!) - it's only the "Zxm*" machine-level extensions that should be sorted after S extensions, all other Z extensions should be before S.

`parseNormalizedArchString`, now used by LLD and llvm-objdump etc isn't strict about order, which is overall an advantage in this case as LLVM tooling isn't broken by changing (or fixing) the order.



More information about the llvm-commits mailing list