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]

[PATCH][C++] mem-ref2 merge, C++ gimplification change


This is the only non-middle-end piece of the mem-ref2 merge.

As we iterate through cp_gimplify_expr on different states of
gimplification and still expect un-gimplified pieces we also
have to still expect INDIRECT_REFs.  So we can't use a predicate
that is supposed to match fully gimplified state.

Ok for trunk together with the mem-ref2 merge?

Thanks,
Richard.

	cp/
	* cp-gimplify.c (cp_gimplify_expr): Open-code the rhs
	predicate we are looking for, allow non-gimplified
	INDIRECT_REFs.

Index: gcc/cp/cp-gimplify.c
===================================================================
--- gcc/cp/cp-gimplify.c	(.../trunk)	(revision 161367)
+++ gcc/cp/cp-gimplify.c	(.../branches/mem-ref2)	(revision 161369)
@@ -575,7 +575,7 @@ cp_gimplify_expr (tree *expr_p, gimple_s
 	  TREE_OPERAND (*expr_p, 1) = build1 (VIEW_CONVERT_EXPR,
 					      TREE_TYPE (op0), op1);
 
-	else if ((rhs_predicate_for (op0)) (op1)
+	else if ((is_gimple_lvalue (op1) || INDIRECT_REF_P (op1))
 		 && !(TREE_CODE (op1) == CALL_EXPR
 		      && CALL_EXPR_RETURN_SLOT_OPT (op1))
 		 && is_really_empty_class (TREE_TYPE (op0)))


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