This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Don't combine across likely spilled hard reg setters (PR rtl-optimization/59477)
- From: Joern Rennecke <joern dot rennecke at embecosm dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Vladimir Makarov <vmakarov at redhat dot com>, Eric Botcazou <ebotcazou at adacore dot com>, Jeff Law <law at redhat dot com>, Richard Biener <rguenther at suse dot de>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 16 Jan 2014 15:19:18 +0000
- Subject: Re: [PATCH] Don't combine across likely spilled hard reg setters (PR rtl-optimization/59477)
- Authentication-results: sourceware.org; auth=none
- References: <20140115215503 dot GG892 at tucnak dot redhat dot com> <CAMqJFCofqydsWgV8zwSADbDbBnj6ZhRofjKqJN7823UnvKLfcw at mail dot gmail dot com> <20140116082651 dot GN892 at tucnak dot redhat dot com>
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.