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] tree-ssa-propagate.c: Remove stmt_makes_single_load.


Hi,

Attached is a patch to remove stmt_makes_single_load.

AFAICT, stmt_makes_single_load has been unused since Revision 139764.

Bootstrapped on x86_64-pc-linux-gnu.  OK to apply?

Kazu Hirata

2009-04-16  Kazu Hirata  <kazu@codesourcery.com>

	* tree-ssa-propagate.c (stmt_makes_single_load): Remove.
	* tree-ssa-propagate.h: Remove the prototype for
	stmt_makes_single_load.

Index: gcc/tree-ssa-propagate.c
===================================================================
--- gcc/tree-ssa-propagate.c	(revision 146080)
+++ gcc/tree-ssa-propagate.c	(working copy)
@@ -828,36 +828,6 @@ ssa_propagate (ssa_prop_visit_stmt_fn vi
 }
 
 
-/* Return true if STMT is of the form 'LHS = mem_ref', where 'mem_ref'
-   is a non-volatile pointer dereference, a structure reference or a
-   reference to a single _DECL.  Ignore volatile memory references
-   because they are not interesting for the optimizers.  */
-
-bool
-stmt_makes_single_load (gimple stmt)
-{
-  tree rhs;
-
-  if (gimple_code (stmt) != GIMPLE_ASSIGN)
-    return false;
-
-  /* Only a GIMPLE_SINGLE_RHS assignment may have a
-     declaration or reference as its RHS.  */
-  if (get_gimple_rhs_class (gimple_assign_rhs_code (stmt))
-      != GIMPLE_SINGLE_RHS)
-    return false;
-
-  if (!gimple_vuse (stmt))
-    return false;
-
-  rhs = gimple_assign_rhs1 (stmt);
-
-  return (!TREE_THIS_VOLATILE (rhs)
-	  && (DECL_P (rhs)
-	      || REFERENCE_CLASS_P (rhs)));
-}
-
-
 /* Return true if STMT is of the form 'mem_ref = RHS', where 'mem_ref'
    is a non-volatile pointer dereference, a structure reference or a
    reference to a single _DECL.  Ignore volatile memory references
Index: gcc/tree-ssa-propagate.h
===================================================================
--- gcc/tree-ssa-propagate.h	(revision 146080)
+++ gcc/tree-ssa-propagate.h	(working copy)
@@ -118,7 +118,6 @@ bool valid_gimple_rhs_p (tree);
 bool valid_gimple_call_p (tree);
 void move_ssa_defining_stmt_for_defs (gimple, gimple);
 bool update_call_from_tree (gimple_stmt_iterator *, tree);
-bool stmt_makes_single_load (gimple);
 bool stmt_makes_single_store (gimple);
 bool substitute_and_fold (prop_value_t *, bool);
 


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