[all-commits] [llvm/llvm-project] 6101d7: [RISCV] Relax rules for ordering s/z/x prefixed ex...
Alex Bradbury via All-commits
all-commits at lists.llvm.org
Tue Jun 27 05:32:32 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6101d720cb499f5ad19293475b429828fa3dbd75
https://github.com/llvm/llvm-project/commit/6101d720cb499f5ad19293475b429828fa3dbd75
Author: Alex Bradbury <asb at igalia.com>
Date: 2023-06-27 (Tue, 27 Jun 2023)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/test/Driver/riscv-arch.c
M llvm/docs/RISCVUsage.rst
M llvm/lib/Support/RISCVISAInfo.cpp
M llvm/unittests/Support/RISCVISAInfoTest.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list