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>
{
int changed;
current_hardreg_regno = regnos[i];
+ if (!df_regs_ever_live_p (current_hardreg_regno))
+ {
+ if (dump_file)
+ fprintf (dump_file, "Skipping hardreg PRE for regno %d, which is never live\n",
+ current_hardreg_regno);
+ continue;
+ }
if (dump_file)
- fprintf(dump_file, "Entering hardreg PRE for regno %d\n",
+ fprintf (dump_file, "Entering hardreg PRE for regno %d\n",
current_hardreg_regno);
delete_unreachable_blocks ();
df_analyze ();