This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Repair TYPE_REF_CAN_ALIAS_ALL machinery
> At worst, you could simply create NMT's that point to all the call
> clobbered variables, and set the pointers with TYPE_REF_CAN_ALIAS_ALL to
> have that NMT in SSA_NAME_PTR_INFO.
It turns out that I need more than the call-clobbered variables, I also need
the call-clobbered SMTs so NMTs won't do (see for example p.adb). I have
something plausible in tree-ssa-alias.c working with our 4.1-based compiler,
but not with the mainline compiler because computation of call-clobberness
for tags is now deferred. Which leads to the following couple of remarks:
1. In compute_may_aliases:
/* Compute flow-sensitive, points-to based aliasing for all the name
memory tags. Note that this pass needs to be done before flow
insensitive analysis because it uses the points-to information
gathered before to mark call-clobbered symbol tags. */
The comment is outdated, the pass doesn't mark tags any longer.
2. In compute_flow_insensitive_aliasing:
/* Skip memory tags and variables that have never been
written to. We also need to check if the variables are
call-clobbered because they may be overwritten by
Note this is effectively random accessing elements in
the sparse bitset, which can be highly inefficient.
So we first check the call_clobbered status of the
tag and variable before querying the bitmap. */
tag_stored_p = is_call_clobbered (tag)
|| bitmap_bit_p (ai->written_vars, DECL_UID (tag));
var_stored_p = is_call_clobbered (var)
|| bitmap_bit_p (ai->written_vars, DECL_UID (var));
if (!tag_stored_p && !var_stored_p)
I think is_call_clobbered (tag) is not accurate at this point.