This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Decrease # of update_stmt calls from alias analysis
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Cc: Diego Novillo <dnovillo at redhat dot com>, gcc-patches at gcc dot gnu dot org, Michael Matz <matz at suse dot de>, Andrew MacLeod <amacleod at redhat dot com>
- Date: Wed, 01 Mar 2006 09:21:30 -0500
- Subject: Re: [patch] Decrease # of update_stmt calls from alias analysis
- References: <20060227170004.GA9176@atrey.karlin.mff.cuni.cz> <1141149999.10812.362.camel@localhost.localdomain> <Pine.LNX.4.58.0602281908051.20821@wotan.suse.de> <1141154104.6054.27.camel@localhost> <20060301102318.GA19301@atrey.karlin.mff.cuni.cz> <44059442.6020900@redhat.com> <20060301135035.GA4064@atrey.karlin.mff.cuni.cz>
On Wed, 2006-03-01 at 14:50 +0100, Zdenek Dvorak wrote:
> Hello,
>
> > > * tree-flow.h (struct stmt_ann_d): Add has_virtual_ops field.
> > > * tree-ssa-structalias.c (find_func_aliases): Only mark
> > > the statements that may have virtual operands for rescanning.
> > > * tree-ssa-operands.c (build_ssa_operands, get_expr_operands,
> > > get_asm_expr_operands, get_call_expr_operands): Set has_virtual_ops
> > > field.
> > >
> > No. Not another state flag to keep up-to-date. Particularly if it
> > gives no benefit. Use stmt_references_memory_p, if you must.
>
> btw. I have responded on the last mail without checking what actually
> stmt_references_memory_p does. Given that it is
> !ZERO_SSA_OPERANDS (stmt, SSA_OP_ALL_VIRTUALS), it obviously cannot be
> used for this purpose -- in the first alias analysis pass, many of the
> statements do not have virtual operands yet.
Then how could your flag be used properly in that case then, unless you
have set it true initially?
Using !ZERO_SSA_OPERANDS is the correct thing to do.
If you want to maintain state, the state you should maintain is whether
this is the first may_alias pass or not.
>
> Zdenek
>