This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PR42782] preserve nonaddressable MEMs at calls in VTA
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 19 Jan 2010 16:27:54 +0100
- Subject: Re: [PR42782] preserve nonaddressable MEMs at calls in VTA
- References: <or7hre2ksx.fsf@livre.localdomain>
On Tue, Jan 19, 2010 at 4:09 PM, Alexandre Oliva <aoliva@redhat.com> wrote:
> When processing call insns, VTA drops all MEMs from location lists, save
> for those that claim to *be* the variable, in their MEM_EXPRs.
>
> This is a bit excessive. ?MEMs referencing variables that are not
> call-clobbered could also be retained. ?This patch implements this.
>
> I had to include tree-flow.h for the static inline definition of
> is_call_clobbered() that it brings in from tree-flow-inline.h, and then
> dump_variable in var-tracking conflicted with the declaration in the
> header file, that refers to an incompatible definition in another file.
> So I renamed the conflicting definition.
>
> Regstrapping on x86_64-linux-gnu. ?Ok if it succeeds?
Please do not introduce uses of is_call_clobbered - it's going to
go away ;) Instead without the original call stmt at hand
for now duplicate
/* If the reference is based on a decl that is not aliased the call
cannot possibly clobber it. */
if (DECL_P (base)
&& !may_be_aliased (base)
/* But local non-readonly statics can be modified through recursion
or the call may implement a threading barrier which we must
treat as may-def. */
&& (TREE_READONLY (base)
|| !is_global_var (base)))
return false;
from call_may_clobber_ref_p_1.
Ok with that change.
Thanks,
Richard.
>
>
> --
> Alexandre Oliva, freedom fighter ? ?http://FSFLA.org/~lxoliva/
> You must be the change you wish to see in the world. -- Gandhi
> Be Free! -- http://FSFLA.org/ ? FSF Latin America board member
> Free Software Evangelist ? ? ?Red Hat Brazil Compiler Engineer
>
>