[PATCH] Don't combine across likely spilled hard reg setters (PR rtl-optimization/59477)

Joern Rennecke joern.rennecke@embecosm.com
Thu Jan 16 15:19:00 GMT 2014


On 16 January 2014 08:26, Jakub Jelinek <jakub@redhat.com> wrote:

> I wonder if instead of not creating the LOG_LINKS we could just somehow taint
> them, add a flag to struct insn_link that we need to be careful about
> combining across that link, then in combine_instructions or the flags together
> from all the used links and if try_combine is called with this
> crosses_likely_spilled_setter_p
> flag, if recog accepts the result look at all constraints on all operands of the
> new insn and if for any constraint anywhere REG_CLASS_FROM_CONSTRAINT is likely
> spilled, punt.  Thoughts on if this could be reliable?

You would miss spills from secondary/tertiary reloads.  OTOH, as
Richard already said,
what you do check is at the same time paranoidly conservative.

Since the failure mode here is an ICE, I think it would be appropriate
to use a target
hook to look at the live likely-spilled register and the combined
insn, and tell if
the combination is safe - and set the default not to worry.



More information about the Gcc-patches mailing list