summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorAlex Bradbury <asb@igalia.com>2023-06-27 13:28:28 +0100
committerAlex Bradbury <asb@igalia.com>2023-06-27 13:32:11 +0100
commit6101d720cb499f5ad19293475b429828fa3dbd75 (patch)
tree9b638e7bf42873f9c7148d028d719022cada758f /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentf8b8affc4a6a5df346b1c29b4b7bf4c46e70d3a1 (diff)
[RISCV] Relax rules for ordering s/z/x prefixed extensions in ISA naming strings
This was discussed somewhat in D148315. As it stands, we require in RISCVISAInfo::parseArchString (used for e.g. -march parsing in Clang) that extensions are given in the order of z, then s, then x prefixed extensions (after the standard single-letter extensions). However, we recently (in D148315) moved to that order from z/x/s as the canonical ordering was changed in the spec. In addition, recent GCC seems to require z* extensions before s*. My recollection of the history here is that we thought keeping -march as close to the rules for ISA naming strings as possible would simplify things, as there's an existing spec to point to. My feeling is that now we've had incompatible changes, and an incompatibility with GCC there's no real benefit to sticking to this restriction, and it risks making it much more painful than it needs to be to copy a -march= string between GCC and Clang. This patch removes all ordering restrictions so you can freely mix x/s/z extensions. To be very explicit, this doesn't change our behaviour when emitting a canonically ordered extension string (e.g. in build attributes). We of course sort according to the canonical order (as we understand it) in that case. Differential Revision: https://reviews.llvm.org/D149246
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions