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]

Spurious TREE_SIDE_EFFECTS set


After gimplification of a rather ugly bitfield reference (containing
stuff like statement expressions :( we still had TREE_SIDE_EFFECTS set.

While not strictly a problem, it does cause us to potentially miss
optimization opportunities and other "quality of implementation" issues.

	* gimplify.c (simplify_expr, case BIT_FIELD_REF): Make sure
	to call recalculate_side_effects after gimplifying the
	operands.

Index: gimplify.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/gimplify.c,v
retrieving revision 1.1.2.53
diff -c -3 -p -r1.1.2.53 gimplify.c
*** gimplify.c	6 Jun 2003 20:08:29 -0000	1.1.2.53
--- gimplify.c	11 Jun 2003 02:46:15 -0000
*************** simplify_expr (expr_p, pre_p, post_p, si
*** 594,599 ****
--- 594,600 ----
  			 is_simple_val, fb_rvalue);
  	  simplify_expr (&TREE_OPERAND (*expr_p, 2), pre_p, post_p,
  			 is_simple_val, fb_rvalue);
+ 	  recalculate_side_effects (*expr_p);
  	  break;
  
  	case NON_LVALUE_EXPR:



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