diff mbox

Privatize recalculate_side_effects

Message ID 3383200.UT62eHieOI@polaris
State New
Headers show

Commit Message

Eric Botcazou Nov. 23, 2013, 10:19 a.m. UTC
Tested on x86_64-suse-linux, applied on the mainline as obvious.


2013-11-23  Eric Botcazou  <ebotcazou@adacore.com>

	* gimplify.h (recalculate_side_effects): Delete.
	* gimplify.c (recalculate_side_effects): Make static and add comment.
ada/
	* gcc-interface/trans.c (Loop_Statement_to_gnu): Set TREE_SIDE_EFFECTS
	on the conditional expression directly.
diff mbox

Patch

Index: gimplify.c
===================================================================
--- gimplify.c	(revision 205300)
+++ gimplify.c	(working copy)
@@ -1757,7 +1757,9 @@  gimplify_var_or_parm_decl (tree *expr_p)
   return GS_ALL_DONE;
 }
 
-void
+/* Recalculate the value of the TREE_SIDE_EFFECTS flag for T.  */
+
+static void
 recalculate_side_effects (tree t)
 {
   enum tree_code code = TREE_CODE (t);
Index: gimplify.h
===================================================================
--- gimplify.h	(revision 205300)
+++ gimplify.h	(working copy)
@@ -64,7 +64,6 @@  extern tree unshare_expr (tree);
 extern tree unshare_expr_without_location (tree);
 extern tree voidify_wrapper_expr (tree, tree);
 extern tree build_and_jump (tree *);
-extern void recalculate_side_effects (tree);
 extern enum gimplify_status gimplify_self_mod_expr (tree *, gimple_seq *,
 						    gimple_seq *, bool, tree);
 extern tree gimple_boolify (tree);
Index: ada/gcc-interface/trans.c
===================================================================
--- ada/gcc-interface/trans.c	(revision 205300)
+++ ada/gcc-interface/trans.c	(working copy)
@@ -2808,8 +2808,8 @@  Loop_Statement_to_gnu (Node_Id gnat_node
   if (gnu_cond_expr)
     {
       COND_EXPR_THEN (gnu_cond_expr) = gnu_loop_stmt;
+      TREE_SIDE_EFFECTS (gnu_cond_expr) = 1;
       gnu_result = gnu_cond_expr;
-      recalculate_side_effects (gnu_cond_expr);
     }
   else
     gnu_result = gnu_loop_stmt;