]> git.ipfire.org Git - thirdparty/gcc.git/commit
LoongArch: Define hook TARGET_COMPUTE_PRESSURE_CLASSES[PR120476]. releases/gcc-14
authorLulu Cheng <chenglulu@loongson.cn>
Wed, 13 Aug 2025 03:04:35 +0000 (11:04 +0800)
committerLulu Cheng <chenglulu@loongson.cn>
Wed, 13 Aug 2025 03:30:09 +0000 (11:30 +0800)
commit00c19ad6da2339add251579fef3d97b3f8a57c2f
treed6d117d99bd8866a3c66bc91f8f12468fe8bfe97
parent5f5ca5a80cd5ca656d06215df72cdb3f6ab45a68
LoongArch: Define hook TARGET_COMPUTE_PRESSURE_CLASSES[PR120476].

The rtx cost value defined by the target backend affects the
calculation of register pressure classes in the IRA, thus affecting
scheduling.  This may cause program performance degradation.
For example, OpenSSL 3.5.1 SHA512 and SPEC CPU 2017 exchange_r.

This problem can be avoided by defining a set of register pressure
classes in the target backend instead of using the default IRA to
automatically calculate them.

gcc/ChangeLog:

PR target/120476
* config/loongarch/loongarch.cc
(loongarch_compute_pressure_classes): New function.
(TARGET_COMPUTE_PRESSURE_CLASSES): Define.

(cherry picked from commit d94178d9b3fb1cb869b90d6f061990eae75c770e)
gcc/config/loongarch/loongarch.cc