This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: alias.c:nonoverlapping_component_refs_p
- From: Richard Henderson <rth at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: bosch at gnat dot com, gcc-patches at gcc dot gnu dot org
- Date: Mon, 3 Dec 2001 17:50:16 -0800
- Subject: Re: alias.c:nonoverlapping_component_refs_p
- References: <10112032134.AA10303@vlsi1.ultra.nyu.edu>
On Mon, Dec 03, 2001 at 04:34:19PM -0500, Richard Kenner wrote:
> I believe you are right: this can occur even in C, though a more common
> example is bit fields: two MEMs made for accesses to two different bits in
> the same byte will certainly alias, but this code will say they won't.
No it won't. I check for DECL_BIT_FIELD and do not apply
this optimization then.
At the same place, I also note that we can derive some information
if we make some assumptions about which bits insert/extract_bit_field
will touch for a given field. For instance, it's unlikely that a
bit at position 0 will be manipulated concurrently with a bit at
position 1000, and in general I'd suspect (but don't know for sure)
that we could bound the check by bit_position/bits_per_word being
equal.
r~