]> git.ipfire.org Git - thirdparty/gcc.git/commit
gcse: Skip hardreg pre when the hardreg is never live [PR121095]
authorAndrew Pinski <quic_apinski@quicinc.com>
Wed, 16 Jul 2025 16:31:35 +0000 (09:31 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Thu, 17 Jul 2025 18:38:44 +0000 (11:38 -0700)
commit6916639b48357334579cf94717a3e51dd003e940
treea998ffdb6f03ad28cd227c2d300657a390bbec6a
parent2954038c821d5f672db89938c4b6feedf29c30aa
gcse: Skip hardreg pre when the hardreg is never live [PR121095]

r15-6789-ge7f98d9603808b added a new RTL pass for hardreg PRE for the hard register
of FPM_REGNUM, this pass could get expensive if you have a large number of basic blocks
and the hard register was never live so it does nothing in the end.
In the aarch64 case, FPM_REGNUM is only used for FP8 related code so it has a high probability
of not being used. So skipping the pass for that register can improve both compile time and memory
usage.

Build and tested for aarch64-linux-gnu.

PR middle-end/121095
gcc/ChangeLog:

* gcse.cc (execute_hardreg_pre): Skip if the hardreg which is never live.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/gcse.cc