This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: Improve handling of earlyclobbers in find_reloads
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Bernd Schmidt <bernds at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 15 Apr 2010 15:38:26 +0100
- Subject: Re: Patch: Improve handling of earlyclobbers in find_reloads
- References: <4BAA918D.9000100@codesourcery.com>
On Wed, 2010-03-24 at 23:26 +0100, Bernd Schmidt wrote:
> This is another problem I found while testing new ARM ldm/stm patterns.
> If you have a pattern such as this,
>
> [(match_parallel 0 "store_multiple_operation"
> [(set (match_operand:SI 1 "s_register_operand" "+&rk")
> (plus:SI (match_dup 1) (const_int 8)))
> (set (mem:SI (match_dup 1))
> (match_operand:SI 2 "arm_hard_register_operand" ""))
> (set (mem:SI (plus:SI (match_dup 1) (const_int 4)))
> (match_operand:SI 3 "arm_hard_register_operand" ""))])]
>
> the earlyclobber constraint should ensure that operand 1 does not
> overlap any of the other inputs (operands 2 and 3). Unfortunately, this
> does not work currently, as the code in find_reloads that examines
> earlyclobber conflicts assumes that an empty constraint string indicates
> that we have a match_operator or match_parallel.
>
> This patch introduces an explicit is_operator flag per operand that can
> be tested in find_reloads. This fixes the bug. Bootstrapped and
> regression tested on i686-linux. Ok?
>
>
> Bernd
OK.
R.