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
Daniel Berlin writes:
> If you are attempting to achieve some optimization of bit fields based
> on the fact that you can't do &bar.x, *this is not the way to do it*.
>
> The way to do that is to say, when you look at when you random
> pointers, "oh, these can't touch the bitfields" (IE somewhere in the
> per-store/load aliasing queries).
Wouldn't this be as simple as assigning the type of
DECL_NONADDRESSABLE_P fields to a different alias set than the alias
set of the type. Subset this alias set with that of its parent. This
alias set would still conflict with anybody potentially referencing
the parent (which would fix the bitfield issue) but would not conflict
with the alias set of the type of the field (which is what the Ada
folks are after)?
Adam