]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Relax early_ra treatment of modes_tieable_p
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 18 Nov 2024 19:32:50 +0000 (19:32 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Mon, 18 Nov 2024 19:32:50 +0000 (19:32 +0000)
commit428f3cacdd6aa631040379cb3c39eb8832957ef1
treef2cdf3225b1a148932ef7c599673c82c30ab0fce
parent102e42a0dffafdd389604f877dbf6430c7394f73
aarch64: Relax early_ra treatment of modes_tieable_p

At least on aarch64, modes_tieable_p is a stricter condition than
can_change_mode_class.  can_change_mode_class tells us whether the
subreg rules produce a sensible result for a particular mode change.
modes_tieable_p in addition tells us whether a mode change is
reasonable for optimisation purposes.

A false return from either hook should (and does) prevent early_ra
from attempting an allocation.  But only a false return from
can_change_mode_class should invalidate the liveness tracking;
we can still analyse subregs for which can_change_mode_class is
true and modes_tieable_p is false.

This doesn't make a difference on its own, but it helps later
patches.

gcc/
* config/aarch64/aarch64-early-ra.cc
(early_ra::get_allocno_subgroup): Split can_change_mode_class test
out from modes_tieable_p test and only invalidate the live range
information for the former.
gcc/config/aarch64/aarch64-early-ra.cc