Patch: Improve handling of earlyclobbers in find_reloads

Bernd Schmidt bernds@codesourcery.com
Wed Mar 24 22:53:00 GMT 2010


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
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: p3-operator.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100324/1fae1345/attachment.ksh>


More information about the Gcc-patches mailing list