[PATCH] Fix PR tree-opt/25500 SRA vs struct containing a vector

Andrew_Pinski@PlayStation.Sony.Com Andrew_Pinski@PlayStation.Sony.Com
Wed Nov 15 00:39:00 GMT 2006


As referenced here:
http://gcc.gnu.org/ml/gcc-patches/2006-08/msg00576.html

This is the version of the patch which I had promissed to sent once my
copyright assignment was cleared up.

The problem is that SRA thinks vectors are too expensive to do a non block 
copy
for a struct just containing that.  This fixes the problem by seeing if we 
have one non
arggregate and always do an element copy.

I added a testcase which should always pass now but was failing before 
this patch.

OK?  Bootstrapped and tested on i686-linux-gnu with no regressions.

Thanks,
Andrew Pinski

ChangeLog:

        * tree-sra.c (decide_block_copy): If we have only one non-
        aggregate element in the struct, don't do a block copy.

        * gcc.dg/tree-ssa/sra-4.c: New test.



-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fixvectorSRA.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061115/129abf29/attachment.txt>


More information about the Gcc-patches mailing list