]> git.ipfire.org Git - thirdparty/gcc.git/commit
AArch64: Annotate SVE instructions with new instruction attribute.
authorJennifer Schmitz <jschmitz@nvidia.com>
Fri, 11 Jul 2025 13:07:30 +0000 (06:07 -0700)
committerJennifer Schmitz <jschmitz@nvidia.com>
Wed, 24 Sep 2025 14:18:17 +0000 (16:18 +0200)
commitcb80cdbef47fa06538c763315e563216ace3673d
treecd3da467642b02a777ec09dad98a938e254f439e
parent41c95d5e53e66a97831e8c6ecdfca62e6f0dab4f
AArch64: Annotate SVE instructions with new instruction attribute.

In this patch, we add the new instruction attribute "sve_type" and use it to
annotate the SVE instructions in aarch64-sve.md and aarch64-sve2.md. This
allows us to use instruction attributes to group instructions into dispatch
groups for dispatch scheduling. While there had already been fine-grained
annotation of scalar and neon instructions (mostly using the "type"-attribute),
annotation was missing for SVE instructions.

The values of the attribute "sve_type" are comparatively coarse-grained, but
fulfill the two criteria we aimed for with regard to dispatch scheduling:
- the annotation allows the definition of CPU-specific high-level attributes
  mapping instructions to dispatch constraints
- the annotation is by itself CPU-independent and consistent, i.e. all
  instructions fulfilling certain criteria are tagged with the corresponding
  value

The patch was bootstrapped and tested on aarch64-linux-gnu, no regression.

Signed-off-by: Jennifer Schmitz <jschmitz@nvidia.com>
gcc/ChangeLog:

* config/aarch64/aarch64-sve.md: Annotate instructions with
attribute sve_type.
* config/aarch64/aarch64-sve2.md: Likewise.
* config/aarch64/aarch64.md (sve_type): New attribute sve_type.
* config/aarch64/iterators.md (sve_type_unspec): New int attribute.
(sve_type_int): New code attribute.
(sve_type_fp): New int attribute.
gcc/config/aarch64/aarch64-sve.md
gcc/config/aarch64/aarch64-sve2.md
gcc/config/aarch64/aarch64.md
gcc/config/aarch64/iterators.md