This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Incorrect bitfield aliasing with Tree SSA
- From: Adam Nemet <anemet at caviumnetworks dot com>
- To: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Cc: dberlin at dberlin dot org, ebotcazou at libertysurf dot fr, gcc-patches at gcc dot gnu dot org
- Date: Tue, 19 Jun 2007 10:57:39 -0700
- Subject: Re: Incorrect bitfield aliasing with Tree SSA
- References: <18034.48960.772642.116034@localhost.localdomain> <200706180839.21793.ebotcazou@libertysurf.fr> <4aca3dc20706180437t362e81e4ofde9d4c58bc77ab2@mail.gmail.com> <200706181435.31764.ebotcazou@libertysurf.fr> <4aca3dc20706180716i34fb334k99eaa5623ec1b1e@mail.gmail.com> <10706181434.AA13943@vlsi1.ultra.nyu.edu> <4aca3dc20706180749j20003942h240903b10cbe4817@mail.gmail.com> <10706181457.AA14808@vlsi1.ultra.nyu.edu> <4aca3dc20706180758w459add5bl66e0ccd851317e27@mail.gmail.com> <10706181525.AA15361@vlsi1.ultra.nyu.edu> <4aca3dc20706180923w7aacaf70nca02f1b1889fee2d@mail.gmail.com> <10706181840.AA18911@vlsi1.ultra.nyu.edu> <18038.53973.176888.769019@localhost.localdomain> <10706181919.AA20122@vlsi1.ultra.nyu.edu> <18038.56438.326248.309718@localhost.localdomain> <10706181934.AA20586@vlsi1.ultra.nyu.edu> <18038.60958.848619.101615@localhost.localdomain> <10706182056.AA22289@vlsi1.ultra.nyu.edu> <18039.29800.223240.870336@localhost.localdomain> <10706191348.AA08767@vlsi1.ultra.nyu.edu>
Richard Kenner writes:
> > + /* Alias set for a DECL_NONADDRESSABLE_P field. Otherwise -1. */
> > + HOST_WIDE_INT alias_set;
>
> Do you need this extra memory? Can't you just have a flag that says
> to look at TYPE_ALIAS_SET (DECL_CONTEXT (field))?
Maybe I am over-complicating but wouldn't that give you the incorrect
answer with a.b.c. Isn't DECL_CONTEXT (field) the type of b here
which might or might not be addressable?
I could use an Ada testcase to work out these recursive cases. I will
try to write one but I am sure it would be quicker for you :).
Adam