Patchwork Remove unused weird get_virtual_var

login
register
mail settings
Submitter Richard Guenther
Date May 16, 2012, 1:31 p.m.
Message ID <Pine.LNX.4.64.1205161530500.11924@jbgna.fhfr.qr>
Download mbox | patch
Permalink /patch/159674/
State New
Headers show

Comments

Richard Guenther - May 16, 2012, 1:31 p.m.
Committed.

Richard.

2012-05-16  Richard Guenther  <rguenther@suse.de>

	* tree-flow.h (get_virtual_var): Remove.
	* tree-dfa.c (get_virtual_var): Likewise.

Patch

Index: gcc/tree-flow.h
===================================================================
--- gcc/tree-flow.h	(revision 187591)
+++ gcc/tree-flow.h	(working copy)
@@ -491,7 +491,6 @@  extern void debug_referenced_vars (void)
 extern void dump_referenced_vars (FILE *);
 extern void dump_variable (FILE *, tree);
 extern void debug_variable (tree);
-extern tree get_virtual_var (tree);
 extern bool add_referenced_var (tree);
 extern void remove_referenced_var (tree);
 extern void mark_symbols_for_renaming (gimple);
Index: gcc/tree-dfa.c
===================================================================
--- gcc/tree-dfa.c	(revision 187591)
+++ gcc/tree-dfa.c	(working copy)
@@ -624,29 +624,6 @@  remove_referenced_var (tree var)
 }
 
 
-/* Return the virtual variable associated to the non-scalar variable VAR.  */
-
-tree
-get_virtual_var (tree var)
-{
-  STRIP_NOPS (var);
-
-  if (TREE_CODE (var) == SSA_NAME)
-    var = SSA_NAME_VAR (var);
-
-  while (TREE_CODE (var) == REALPART_EXPR || TREE_CODE (var) == IMAGPART_EXPR
-	 || handled_component_p (var))
-    var = TREE_OPERAND (var, 0);
-
-  /* Treating GIMPLE registers as virtual variables makes no sense.
-     Also complain if we couldn't extract a _DECL out of the original
-     expression.  */
-  gcc_assert (SSA_VAR_P (var));
-  gcc_assert (!is_gimple_reg (var));
-
-  return var;
-}
-
 /* Mark all the naked symbols in STMT for SSA renaming.  */
 
 void