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: [1/6] Handle gphis in gimple_get_lhs


On 08/28/2018 05:20 AM, Richard Sandiford wrote:
> Several callers of gimple_get_lhs deal with statements that might
> be phis.  This patch makes gimple_get_lhs handle that case too,
> so that the callers don't have to.
> 
> 
> 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
> 
> gcc/
> 	* gimple.c (gimple_get_lhs): Handle gphis.
> 	* tree-ssa-phionlycprop.c (get_lhs_or_phi_result): Delete and...
> 	(propagate_rhs_into_lhs, eliminate_const_or_copy): ...use
> 	gimple_get_lhs instead.
> 	* tree-ssa-dom.c (eliminate_redundant_computations): Don't handle
> 	phis specially before calling gimple_get_lhs.
> 	* tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
> 	Likewise.
> 	* tree-vect-loop.c (vectorizable_live_operation): Likewise.
> 	* tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
> 	(vect_get_slp_defs): Likewise.
> 	* tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Likewise.
> 	(vect_get_vec_def_for_stmt_copy, vect_transform_stmt): Likewise.
I pondered doing this repeatedly through the years.  So I'm all for it.
Changes look fine to me.

jeff


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