This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Spurious TREE_SIDE_EFFECTS set
- From: law at redhat dot com
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 10 Jun 2003 20:50:14 -0600
- Subject: Spurious TREE_SIDE_EFFECTS set
- Reply-to: law at redhat dot com
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: