https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21182

--- Comment #23 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Jeffrey A. Law from comment #22)
> Vlad -- I was thinking more in the sense of whether or not IRA is presented
> with something reasonable (ie, can be colored) vs unreasonable (can not be
> colored).
> 
> The former is clearly possible with this source, but we well could be making
> the graph uncolorable with some of the early tree optimizations -- I
> certainly saw enough cprop/forwprop/dom transformations to give me concern
> that what we're presenting to IRA isn't colorable.

IRA can print the register pressure.  If it is bigger than the number of
available hard regs,  the graph cannot be colored for sure.  For -UNAIL_REGS
and -O3 I see the pressure 10 (and 7 available hard regs).  So it is not
colorable.

If the pressure is less or the same number it is really hard to define manually
non-trivial graph colorability.  It is even harder to evaluate the minimal
number of spill pseudos manually.  But we can evaluate the lower bound.

  To achieve register pressure 7 we need to spill at least 3 pseudos.   As the
pseudos should be defined and used, it means at least 6 stack memory
references.  It is more than 3 reported for the older GCC versions.  My
conclusion is that the optimizations before became more aggressive and they are
at least partially responsible for worse results.

So I believe, Jeff, your suspicions about the previous optimizations have a
ground.

Reply via email to