PATCH: Remove redundant instructions after regcprop

Paulo J. Matos paulo@matos-sorge.com
Thu Aug 2 13:42:00 GMT 2012


On 02/08/12 11:25, Steven Bosscher wrote:
> Hello,
>
> Thanks for working on this.
>
> How did you test this?
>

This patch is for GCC46. The main problem is that I was not able to 
reproduce it (yet) for any upstream backends. I therefore patched GCC46 
and tested our backend (where I can easily reproduce the problem) with 
our commercial test suites and our own hand-crafted suite.

I would be eager to know if you have any suggestion on how to test this 
with upstream backends even if we can't reproduce it. One way would be 
to test trunk before and after patch and see if we introduce any 
testsuite regressions, but it feels slightly useless if this problem 
doesn't occur with x86 (maybe due to the large amount of registers, or 
how move rules are described in the backend).

 > How do you account for mode differences between
 > the two registers?

 From what I understand about the code is that a simple move between two 
registers will always have registers with the same mode, so mode is not 
a worry. That was also the assumption of the code that was written 
before which had in copy_value:
/* Assert that SRC has been copied to DEST.  Adjust the data structures to
reflect that SRC contains an older copy of the shared value.  */

static void
copy_value (rtx dest, rtx src, struct value_data *vd)
{
   unsigned int dr = REGNO (dest);
   unsigned int sr = REGNO (src);
   unsigned int dn, sn;
   unsigned int i;

   /* ??? At present, it's possible to see noop sets.  It'd be nice if 
this were
cleaned up beforehand...  */
   if (sr == dr)
     return;

> Please also fix the patch (and the ChangeLog entry) to conform to the
> GCC coding style requirements.
>

Richard already sent me a message about that.
Those problems were lack of experience with patch submission. Will sort 
that out and resend.

Thanks for your interest in the patch,

Paulo Matos

> Ciao!
> Steven
>


-- 
PMatos



More information about the Gcc-patches mailing list