RFA: one more patch to solve PR37535

Vladimir Makarov vmakarov@redhat.com
Tue Sep 30 02:05:00 GMT 2008


Jeff, This is one more patch to fix PR37355.  The changes in comparison 
with previous version are in mark_early_clobber and 
process_bb_node_lives.   The problem was in wrong processing early 
clobber of hard registers which are not operands and therefore have no 
constraints.  One example of such insn from rs6000.md is

(define_insn ""
  [(set (mem:BLK (match_operand:SI 0 "gpc_reg_operand" "b"))
    (mem:BLK (match_operand:SI 1 "gpc_reg_operand" "b")))
   (use (match_operand:SI 2 "immediate_operand" "i"))
   (use (match_operand:SI 3 "immediate_operand" "i"))
   (clobber (match_operand:SI 4 "gpc_reg_operand" "=&r"))
   (clobber (reg:SI  6))
   (clobber (reg:SI  7))
   (clobber (reg:SI  8))
   (clobber (reg:SI  9))
   (clobber (reg:SI 10))
   (clobber (reg:SI 11))
   (clobber (reg:SI 12))
   (clobber (match_scratch:SI 5 "=q"))]

Now all clobbers of hard registers are treated as early clobbers.

Last 3 days I tested the patch on 4 platforms for all reported problems 
on bootstraps (as crashes and code differences) and testsuite 
regressions using stage3 compiler.  Al the problems are reported for ppc 
with specific config options.

The patch was successfully tested on bootstrap x86, i686, itanium, 
ppc64, ppc64 with --with-cpu=default32, ppc64 with --with-cpu=default32 
--with-tune=cell.  The patch was also sucessfully tested on gcc testuite 
on x86, x86_64, itanium, ppc64, and ppc64 with --with-cpu=default32 
--with-tune=cell on the bootstrapped version.

Ok to commit?

Sorry, for any inconvinience with the previous version of the patch.  I 
tested it thorougly but it was not enough to find the problem.

2008-09-24  Vladimir Makarov  <vmakarov@redhat.com>

    PR middle-end/37535

    * ira-lives.c (mark_reg_live, mark_reg_dead): New functions.
    (mark_ref_live, mark_ref_dead): Use them.
    (def_conflicts_with_inputs_p): Remove.
    (mark_early_clobbers): New function.
    (process_bb_node_lives): Call preprocess_constraints and
    mark_early_clobbers.  Process inputs again if necessary.

    * doc/rtx.texi (clobber): Change how RA deals with clobbers.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr37535-v4.patch
Type: text/x-patch
Size: 7203 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080930/9020be97/attachment.bin>


More information about the Gcc-patches mailing list