On 11/16/18 9:27 AM, Andrew Stubbs wrote:
> 
> This patch is unchanged from that which was posted before.  Discussion
> fizzled out there and I was too busy with other patches to restart it
> then.  This issue needs to be resolved before libgfortran can be
> compiled for GCN.
> 
> The IRA pass makes an assumption that any pseudos created after the pass 
> begins
> were created explicitly by the pass itself and therefore will have
> corresponding entries in its other tables.
> 
> The GCN back-end, however, often creates additional pseudos, in expand
> patterns, to represent the necessary EXEC value, and these break IRA's
> assumption and cause ICEs:
> 
> ..../libgfortran/generated/matmul_r8.c: In function 'matmul_r8':
> ..../libgfortran/generated/matmul_r8.c:3002:1: internal compiler error: in 
> setup_preferred_alternate_classes_for_new_pseudos, at ira.c:2772
> 
> This patch simply has IRA skip unknown pseudos, and the problem goes away.
> 
> Presumably, it's not ideal that these registers have not been processed by 
> IRA,
> but it does not appear to do any real harm.
> 
> 2018-11-16  Andrew Stubbs  <a...@codesourcery.com>
> 
>       gcc/
>       * ira.c (setup_preferred_alternate_classes_for_new_pseudos): Skip
>       pseudos not created by this pass.
>       (move_unallocated_pseudos): Likewise.
This seems like a really gross hack and sets an expectation that
generating registers in the target after IRA has started is OK.  It is
not OK.  THe fact that this works is, IMHO, likely an accident.

I think this comes back to the fundamental representational issue with
the EXEC handling that still needs to be addressed.

Jeff

Reply via email to