On 2022-01-11 12:42, Richard Sandiford wrote:
The new IRA heuristics would need more work on old-reload targets,
since flattening needs to be able to undo the cost propagation.
It's doable, but hardly seems worth it.
Agree. It is not worth to spend your time for work for reload.
This patch therefore makes all the new calls to
ira_subloop_allocnos_can_differ_p return false if !ira_use_lra_p.
The color_pass code that predated the new function (and that was
the source of ira_subloop_allocnos_can_differ_p) continues to
behave as before.

It's a hack, but at least it has the advantage that the new parameter
would become obviously unused if reload and (!)ira_use_lra_p were
removed.  The hack should therefore disappear alongside reload.
I have a feeling that it will stay for a long time if not forever. Recently I had the same problem.  My performance patch for IRA resulted in ice in reload pass on SH4.
Tested on aarch64-linux-gnu and cris-elf.  OK to install?
OK.  Thank you.


gcc/
        PR rtl-optimization/103974
        * ira-int.h (ira_subloop_allocnos_can_differ_p): Take an
        extra argument, default true, that says whether old-reload
        targets should be excluded.
        * ira-color.c (color_pass): Pass false.

Reply via email to