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]

Re: [PATCH, pretty-ipa] Fix wave ICE in SRA


On Wed, May 6, 2009 at 11:53 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> It looks like that if the theory is that the extra size can only be padding
>> we can simply ignore this difference - and chose either size that fits
>> our previous analysis more. ?Would that be a solution for the SRA problem?
>
> I'd be careful, the extra size is not padding for bit-fields, it's in another
> member of the structure. ?And using

So the larger TYPE_SIZE is in fact correct?  (Note that for this particular
issue bitfields do not matter)

I think we can arrive at a mismatch situation very easily as outlined in my
mail before.  How does RTL expansion handle this in the face of struct
copies?  I guess it's simply taking the size of the target.

> ?if (TREE_CODE (exp) == COMPONENT_REF)
> ? ?size_tree = TYPE_SIZE (TREE_TYPE (TREE_OPERAND (exp, 1)));
> ?else if ...and so on...
>
> is wrong, it's DECL_SIZE (TREE_OPERAND (exp, 1)).

They should be exchangable in the context of an access.  At least

  ... = x.a;

and

  p = &x.a;
  ... = *p;

already have different sizes and that better should not matter(?).

Richard.


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