This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.



Attachment: fixvectorSRA.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]