RFC: VTA alias set discrepancy
Jakub Jelinek
jakub@redhat.com
Wed Mar 17 16:42:00 GMT 2010
On Wed, Mar 17, 2010 at 12:06:49PM -0400, Aldy Hernandez wrote:
> What happens is that rtl_for_decl_location():dwarf2out.c will call
> make_decl_rtl() which further down the call chain will call
> get_alias_set/new_alias_set. It matters not that we reset DECL_RTL
> immediately after, we have already created a new alias set for first
> time callers:
>
> /* Try harder to get a rtl. If this symbol ends up not being emitted
> in the current CU, resolve_addr will remove the expression referencing
> it. */
> ...
> ...
> {
> rtl = DECL_RTL (decl);
> /* Reset DECL_RTL back, as various parts of the compiler expects
> DECL_RTL set meaning it is actually going to be output. */
> SET_DECL_RTL (decl, NULL);
expand_debug_expr is another such spot.
I guess best would be to make sure no new alias set is created in these
places. Perhaps
int save_strict_aliasing = flag_strict_aliasing;
flag_strict_aliasing = 0;
rtl = DECL_RTL (decl);
flag_strict_aliasing = save_strict_aliasing;
in both places?
The rtls created this way are used only for DEBUG purposes.
I bet C/C++ FEs create the alias set for the decls much earlier...
Jakub
More information about the Gcc
mailing list