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

Jun Sha via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 17 23:57:11 PDT 2023


joshua-arch1 added a comment.

In D148315#4276536 <https://reviews.llvm.org/D148315#4276536>, @asb wrote:

> 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. (EDIT: when ingesting binaries at least - you'd see problems with a .s that sets the attributes)

I cannot find the specific logic for OrderedExtensionMap that sorts S* then Z* then X*.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148315/new/

https://reviews.llvm.org/D148315



More information about the llvm-commits mailing list