On Mon, Jan 16, 2012 at 4:58 PM, Aldy Hernandez <al...@redhat.com> wrote:
>
>> Not really - you handle both ptr and *ptr in the same predicate and
>> call both "address escaped".  What I suggested was sth like
>
>
> I think I confused myself and you by asking the wrong question in the first
> place.
>
> Actually, what I want is to handle VAR_DECL correctly, and your original
> suggestion of using may_be_aliased() fits the bill.  The other calls to
> ptr_deref_may_alias_global_p() were fine because we have an SSA_NAME.
>
> We're now down to a one-liner :).
>
> How about this?  All TM memory optimization tests fixed, and no regressions.

Ok.  Note that may_be_aliased (x) is also true if x is an automatic variable
that has its address taken.  You can use is_global_var (x) instead if you
only want to test for "global memory".

Richard.

Reply via email to