This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Decrease # of update_stmt calls from alias analysis


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
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]