On 2019-12-17 1:02 p.m., Eric Botcazou wrote:
Hi,

LRA is getting measurably slower since GCC 8, at least on x86, and things are
worsening since GCC 9.  While this might be legitimate when optimization is
enabled, it's a pure waste of cycles at -O0 so the attached patch switches LRA
over to using the simple algorithm when optimization is disabled.  The effect
on code size is tiny (typically 0.2% on x86).

Tested on x86_64-suse-linux, OK for the mainline?

Eric, thank you for reporting this issue and providing the patch.   Simple LRA algorithms switch off hard register splitting, so there might a slightly bigger chance for occurring "can find reload register" error (e.g. when -O0 -fschedule-insns is used). But this error is still not solved in general case and in my experience the chance for this error is even bigger for optimized modes than for -O0 with simple LRA algorithms.

Saying that I believe the patch is OK for the trunk.

2019-12-17  Eric Botcazou  <ebotca...@adacore.com>

        * ira.c (ira): Use simple LRA algorithm when not optimizing.


Reply via email to