aliasing question
Diego Novillo
dnovillo@redhat.com
Tue Sep 7 14:22:00 GMT 2004
On Tue, 2004-09-07 at 06:51, Jan Hubicka wrote:
> # V_MUST_DEF <value_49>;
> value = T.4862_48;
>
> and alias1 dump:
>
> # value_229 = V_MAY_DEF <value_19>;
> value = T.4862_48;
>
> Why the MUST_DEF is getting converted to MAY_DEF in such a obvious case
> for MUST_DEF?
>
Before aliasing, 'value' did not belong to any alias set, but after
aliasing it is. If we didn't do that, suppose that:
*p, alias tag TMT.1, alias set of TMT.1 = { value }
1. p = (cond) ? &value : foo ();
2. *p = 3;
3. value = T.4862;
4. return *p;
If you put a V_MUST_DEF in statement #3, you will consider '*p = 3'
dead. Perhaps, we could put a V_MUST_DEF if there were more than one
element in TMT.1's alias set. Not sure how much would that buy, but it
may be an interesting experiment.
Diego.
More information about the Gcc
mailing list