[PATCH] Improve alias information for arrays
Eric Botcazou
ebotcazou@adacore.com
Sun Jan 8 05:31:00 GMT 2006
> # FRAME.1_2 = V_MAY_DEF <FRAME.1_1>;
> FRAME.1.zoo_data_base[1]{lb: 1 sz: 7} = "Animal ";
> D.633_3 = 1;
> D.641_4 = &FRAME.1.zoo_data_base[1]{lb: 1 sz: 7}[D.633_3 ...]{lb: 1 sz:
> 1};
> D.634_5 = D.641_4;
> D.635_6 = (character[1:6] *) D.634_5;
> # VUSE <TMT.7_8>;
> D.636_7 = __builtin_memcmp (D.635_6, "Animal", 6);
>
> we say D.641 points to ANYTHING and so give it a TMT, but at the
> point of initialization we have a V_MAY_DEF, which looks bogus.
I think we should have a VUSE for FRAME.1 on the call to __builtin_memcmp
because its address precisely escapes at this call point. Look at the
constraint computed for
D.641_4 = &FRAME.1.zoo_data_base[1]{lb: 1 sz: 7}[D.633_3 ...]{lb: 1 sz:
It should reference FRAME.1 and not ANYTHING.
> Is there any chance btw. for Ada no longer disabling struct-aliasing?
I don't really know why it has been disabled (there is no comment). But given
that we have made no progress wrt to our problems with SRA, I'd doubt it.
--
Eric Botcazou
More information about the Gcc-patches
mailing list