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]

[vta, vta4.4] Re: VTA merge - ssa (gimple, trees, tuples)


On Jun  5, 2009, Alexandre Oliva <aoliva@redhat.com> wrote:

> On Jun  5, 2009, Richard Guenther <richard.guenther@gmail.com> wrote:
>> - IS_DEBUG_STMT should be a gimple_debug_p or is_gimple_debug
>> inline function in gimple.h.  In fact, all of the macros that operate on
>> gimple should be inline functions and in gimple.h.  They also need
>> documentation in gimple.texi (maybe that follows, I'm not that far yet).

> Aaah, the wonders of old patches being maintained over so many moons
> with multUple changes ;-)

> Thanks, will fix.  Likewise IS_DEBUG_BIND.

Fixed as follows.  First patch for the var-trackign-assignments-branch,
second for the var-tracking-assignments-4.4-branch.  I'm merging the
former into the VTA patchset.

for  gcc/ChangeLog.vta
from  Alexandre Oliva  <aoliva@redhat.com>

	* tree.h (IS_DEBUG_STMT): Removed.  Replace with is_gimple_debug.
	(IS_DEBUG_BIND): Removed.  Replace with gimple_debug_bind_p.
	* doc/gimple.texi (is_gimple_debug): New.
	(gimple_debug_bind_p): New.
	(is_gimple_call, gimple_assign_cast_p): End sentence with period.
	* gimple.h: Adjust.
	(is_gimple_debug, gimple_debug_bind_p): New.
	(gimple_debug_bind_get_var, gimple_debug_bind_get_value): Use them.
	(gimple_debug_bind_get_value_ptr, gimple_debug_bind_set_var): Ditto.
	(gimple_debug_bind_set_value): Likewise.
	* cfgexpand.c: Adjust.
	* gimple-pretty-print.c: Adjust.
	* gimple.c: Adjust.
	* ipa-pure-const.c: Adjust.
	* ipa-reference.c: Adjust.
	* tree-cfg.c: Adjust.
	* tree-cfgcleanup.c: Adjust.
	* tree-dfa.c: Adjust.
	* tree-flow-inline.h: Adjust.
	* tree-inline.c: Adjust.
	* tree-into-ssa.c: Adjust.
	* tree-outof-ssa.c: Adjust.
	* tree-parloops.c: Adjust.
	* tree-ssa-forwprop.c: Adjust.
	* tree-ssa-live.c: Adjust.
	* tree-ssa-loop-ch.c: Adjust.
	* tree-ssa-loop-ivopts.c: Adjust.
	* tree-ssa-loop-manip.c: Adjust.
	* tree-ssa-operands.c: Adjust.
	* tree-ssa-phiopt.c: Adjust.
	* tree-ssa-propagate.c: Adjust.
	* tree-ssa-sink.c: Adjust.
	* tree-ssa-ter.c: Adjust.
	* tree-ssa-threadedge.c: Adjust.
	* tree-ssa-threadupdate.c: Adjust.
	* tree-ssa.c: Adjust.
	* tree-stdarg.c: Adjust.
	* tree-tailcall.c: Adjust.
	* tree-vect-loop.c: Adjust.
	* tree-vrp.c: Adjust.
	* tree-if-conv.c: Adjust.
	* tree-ssa-dce.c: Adjust.
	* tree-ssa-dom.c: Adjust
	* rtl.h (MAY_HAVE_DEBUG_INSNS): Alias to MAY_HAVE_DEBUG_STMTS.

Index: gcc/tree.h
===================================================================
--- gcc/tree.h.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree.h	2009-06-10 07:34:10.000000000 -0300
@@ -1526,16 +1526,6 @@ struct GTY(()) tree_constructor {
 				 && VOID_TYPE_P (TREE_TYPE (NODE)) \
 				 && integer_zerop (TREE_OPERAND (NODE, 0)))
 
-/* Nonzero if NODE is a debug statement.  */
-#define IS_DEBUG_STMT(NODE)     (gimple_code (NODE) == GIMPLE_DEBUG)
-
-/* Nonzero if NODE is a debug bind statement.  */
-#define IS_DEBUG_BIND(NODE)	(IS_DEBUG_STMT (NODE) && \
-				 (NODE)->gsbase.subcode == VAR_DEBUG_VALUE)
-
-/* Nonzero if IS_DEBUG_STMT may possibly.  */
-#define MAY_HAVE_DEBUG_STMTS    (flag_var_tracking_assignments)
-
 /* In ordinary expression nodes.  */
 #define TREE_OPERAND_LENGTH(NODE) tree_operand_length (NODE)
 #define TREE_OPERAND(NODE, I) TREE_OPERAND_CHECK (NODE, I)
@@ -1548,6 +1538,9 @@ struct GTY(()) tree_constructor {
 #define VL_EXP_OPERAND_LENGTH(NODE) \
   ((int)TREE_INT_CST_LOW (VL_EXP_CHECK (NODE)->exp.operands[0]))
 
+/* Nonzero if is_gimple_debug() may possibly hold.  */
+#define MAY_HAVE_DEBUG_STMTS    (flag_var_tracking_assignments)
+
 /* The second operand of a VAR_DEBUG_VALUE when the value was
    optimized away.  */
 #define VAR_DEBUG_VALUE_NOVALUE NULL_TREE /* error_mark_node */
Index: gcc/doc/gimple.texi
===================================================================
--- gcc/doc/gimple.texi.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/doc/gimple.texi	2009-06-10 07:34:10.000000000 -0300
@@ -692,12 +692,21 @@ Return true if the code of g is @code{GI
 @end deftypefn
  
 @deftypefn {GIMPLE function} is_gimple_call (gimple g)
-Return true if the code of g is @code{GIMPLE_CALL}
+Return true if the code of g is @code{GIMPLE_CALL}.
 @end deftypefn
  
+@deftypefn {GIMPLE function} is_gimple_debug (gimple g)
+Return true if the code of g is @code{GIMPLE_DEBUG}.
+@end deftypefn
+
 @deftypefn {GIMPLE function} gimple_assign_cast_p (gimple g)
 Return true if g is a @code{GIMPLE_ASSIGN} that performs a type cast
-operation
+operation.
+@end deftypefn
+
+@deftypefn {GIMPLE function} gimple_debug_bind_p (gimple g)
+Return true if g is a @code{GIMPLE_DEBUG} that binds the value of an
+expression to a variable.
 @end deftypefn
 
 @node Manipulating GIMPLE statements
Index: gcc/gimple.h
===================================================================
--- gcc/gimple.h.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/gimple.h	2009-06-10 07:34:10.000000000 -0300
@@ -3191,6 +3191,24 @@ gimple_switch_set_default_label (gimple 
   gimple_switch_set_label (gs, 0, label);
 }
 
+/* Return true if GS is a GIMPLE_DEBUG statement.  */
+
+static inline bool
+is_gimple_debug (const_gimple gs)
+{
+  return gimple_code (gs) == GIMPLE_DEBUG;
+}
+
+/* Return true if S is a GIMPLE_DEBUG BIND statement.  */
+
+static inline bool
+gimple_debug_bind_p (const_gimple s)
+{
+  if (is_gimple_debug (s))
+    return s->gsbase.subcode == VAR_DEBUG_VALUE;
+
+  return false;
+}
 
 /* Return the variable bound in a GIMPLE_DEBUG bind statement.  */
 
@@ -3198,7 +3216,7 @@ static inline tree
 gimple_debug_bind_get_var (gimple dbg)
 {
   GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
-  gcc_assert (dbg->gsbase.subcode == VAR_DEBUG_VALUE);
+  gcc_assert (gimple_debug_bind_p (dbg));
   return gimple_op (dbg, 0);
 }
 
@@ -3209,7 +3227,7 @@ static inline tree
 gimple_debug_bind_get_value (gimple dbg)
 {
   GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
-  gcc_assert (dbg->gsbase.subcode == VAR_DEBUG_VALUE);
+  gcc_assert (gimple_debug_bind_p (dbg));
   return gimple_op (dbg, 1);
 }
 
@@ -3220,7 +3238,7 @@ static inline tree *
 gimple_debug_bind_get_value_ptr (gimple dbg)
 {
   GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
-  gcc_assert (dbg->gsbase.subcode == VAR_DEBUG_VALUE);
+  gcc_assert (gimple_debug_bind_p (dbg));
   return gimple_op_ptr (dbg, 1);
 }
 
@@ -3230,7 +3248,7 @@ static inline void
 gimple_debug_bind_set_var (gimple dbg, tree var)
 {
   GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
-  gcc_assert (dbg->gsbase.subcode == VAR_DEBUG_VALUE);
+  gcc_assert (gimple_debug_bind_p (dbg));
   gimple_set_op (dbg, 0, var);
 }
 
@@ -3241,7 +3259,7 @@ static inline void
 gimple_debug_bind_set_value (gimple dbg, tree value)
 {
   GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
-  gcc_assert (dbg->gsbase.subcode == VAR_DEBUG_VALUE);
+  gcc_assert (gimple_debug_bind_p (dbg));
   gimple_set_op (dbg, 1, value);
 }
 
@@ -4426,7 +4444,7 @@ gsi_next_nondebug (gimple_stmt_iterator 
 {
   do
     gsi_next (i);
-  while (!gsi_end_p (*i) && IS_DEBUG_STMT (gsi_stmt (*i)));
+  while (!gsi_end_p (*i) && is_gimple_debug (gsi_stmt (*i)));
 }
 
 /* Advance the iterator to the next non-debug gimple statement.  */
@@ -4436,7 +4454,7 @@ gsi_prev_nondebug (gimple_stmt_iterator 
 {
   do
     gsi_prev (i);
-  while (!gsi_end_p (*i) && IS_DEBUG_STMT (gsi_stmt (*i)));
+  while (!gsi_end_p (*i) && is_gimple_debug (gsi_stmt (*i)));
 }
 
 /* Return a new iterator pointing to the first non-debug statement in
@@ -4447,7 +4465,7 @@ gsi_start_nondebug_bb (basic_block bb)
 {
   gimple_stmt_iterator i = gsi_start_bb (bb);
 
-  if (!gsi_end_p (i) && IS_DEBUG_STMT (gsi_stmt (i)))
+  if (!gsi_end_p (i) && is_gimple_debug (gsi_stmt (i)))
     gsi_next_nondebug (&i);
 
   return i;
@@ -4461,7 +4479,7 @@ gsi_last_nondebug_bb (basic_block bb)
 {
   gimple_stmt_iterator i = gsi_last_bb (bb);
 
-  if (!gsi_end_p (i) && IS_DEBUG_STMT (gsi_stmt (i)))
+  if (!gsi_end_p (i) && is_gimple_debug (gsi_stmt (i)))
     gsi_prev_nondebug (&i);
 
   return i;
Index: gcc/cfgexpand.c
===================================================================
--- gcc/cfgexpand.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/cfgexpand.c	2009-06-10 07:34:10.000000000 -0300
@@ -2850,7 +2850,7 @@ expand_gimple_basic_block (basic_block b
 	  if (new_bb)
 	    return new_bb;
 	}
-      else if (IS_DEBUG_STMT (stmt))
+      else if (is_gimple_debug (stmt))
 	{
 	  location_t sloc = get_curr_insn_source_location ();
 	  tree sblock = get_curr_insn_block ();
@@ -2906,7 +2906,7 @@ expand_gimple_basic_block (basic_block b
 	      if (gsi_end_p (nsi))
 		break;
 	      stmt = gsi_stmt (nsi);
-	      if (!IS_DEBUG_STMT (stmt))
+	      if (!is_gimple_debug (stmt))
 		break;
 	    }
 
Index: gcc/gimple-pretty-print.c
===================================================================
--- gcc/gimple-pretty-print.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/gimple-pretty-print.c	2009-06-10 07:34:10.000000000 -0300
@@ -1606,7 +1606,7 @@ dump_bb_header (pretty_printer *buffer, 
 	  gimple_stmt_iterator gsi;
 
 	  for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
-	    if (!IS_DEBUG_STMT (gsi_stmt (gsi))
+	    if (!is_gimple_debug (gsi_stmt (gsi))
 		&& get_lineno (gsi_stmt (gsi)) != UNKNOWN_LOCATION)
 	      {
 		pp_string (buffer, ", starting at line ");
Index: gcc/gimple.c
===================================================================
--- gcc/gimple.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/gimple.c	2009-06-10 07:34:10.000000000 -0300
@@ -1255,7 +1255,7 @@ empty_body_p (gimple_seq body)
     return true;
   for (i = gsi_start (body); !gsi_end_p (i); gsi_next (&i))
     if (!empty_stmt_p (gsi_stmt (i))
-	&& !IS_DEBUG_STMT (gsi_stmt (i)))
+	&& !is_gimple_debug (gsi_stmt (i)))
       return false;
 
   return true;
@@ -2271,7 +2271,7 @@ gimple_has_side_effects (const_gimple s)
 {
   unsigned i;
 
-  if (IS_DEBUG_STMT (s))
+  if (is_gimple_debug (s))
     return false;
 
   /* We don't have to scan the arguments to check for
@@ -2367,7 +2367,7 @@ gimple_rhs_has_side_effects (const_gimpl
 	    return true;
 	  }
     }
-  else if (IS_DEBUG_STMT (s))
+  else if (is_gimple_debug (s))
     return false;
   else
     {
Index: gcc/ipa-pure-const.c
===================================================================
--- gcc/ipa-pure-const.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/ipa-pure-const.c	2009-06-10 07:34:10.000000000 -0300
@@ -399,7 +399,7 @@ check_stmt (gimple_stmt_iterator *gsip, 
   gimple stmt = gsi_stmt (*gsip);
   unsigned int i = 0;
 
-  if (IS_DEBUG_STMT (stmt))
+  if (is_gimple_debug (stmt))
     return;
 
   if (dump_file)
Index: gcc/ipa-reference.c
===================================================================
--- gcc/ipa-reference.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/ipa-reference.c	2009-06-10 07:34:10.000000000 -0300
@@ -442,7 +442,7 @@ scan_stmt_for_static_refs (gimple_stmt_i
   gimple stmt = gsi_stmt (*gsip);
   ipa_reference_local_vars_info_t local = NULL;
 
-  if (IS_DEBUG_STMT (stmt))
+  if (is_gimple_debug (stmt))
     return NULL;
 
   if (fn)
Index: gcc/tree-cfg.c
===================================================================
--- gcc/tree-cfg.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-cfg.c	2009-06-10 07:34:10.000000000 -0300
@@ -2705,7 +2705,7 @@ first_stmt (basic_block bb)
   gimple_stmt_iterator i = gsi_start_bb (bb);
   gimple stmt = NULL;
 
-  while (!gsi_end_p (i) && IS_DEBUG_STMT ((stmt = gsi_stmt (i))))
+  while (!gsi_end_p (i) && is_gimple_debug ((stmt = gsi_stmt (i))))
     {
       gsi_next (&i);
       stmt = NULL;
@@ -2721,7 +2721,7 @@ last_stmt (basic_block bb)
   gimple_stmt_iterator i = gsi_last_bb (bb);
   gimple stmt = NULL;
 
-  while (!gsi_end_p (i) && IS_DEBUG_STMT ((stmt = gsi_stmt (i))))
+  while (!gsi_end_p (i) && is_gimple_debug ((stmt = gsi_stmt (i))))
     {
       gsi_prev (&i);
       stmt = NULL;
@@ -4185,7 +4185,7 @@ verify_stmt (gimple_stmt_iterator *gsi)
 	}
     }
 
-  if (IS_DEBUG_STMT (stmt))
+  if (is_gimple_debug (stmt))
     {
       check_and_update_debug_stmt (stmt, NULL);
       return false;
Index: gcc/tree-cfgcleanup.c
===================================================================
--- gcc/tree-cfgcleanup.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-cfgcleanup.c	2009-06-10 07:34:10.000000000 -0300
@@ -420,7 +420,7 @@ remove_forwarder_block (basic_block bb)
 	{
 	  label = gsi_stmt (gsi);
 	  gcc_assert (gimple_code (label) == GIMPLE_LABEL
-		      || IS_DEBUG_STMT (label));
+		      || is_gimple_debug (label));
 	  gsi_remove (&gsi, false);
 	  gsi_insert_before (&gsi_to, label, GSI_SAME_STMT);
 	}
Index: gcc/tree-dfa.c
===================================================================
--- gcc/tree-dfa.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-dfa.c	2009-06-10 07:34:10.000000000 -0300
@@ -90,7 +90,7 @@ find_referenced_vars (void)
       for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si))
 	{
 	  gimple stmt = gsi_stmt (si);
-	  if (IS_DEBUG_STMT (stmt))
+	  if (is_gimple_debug (stmt))
 	    continue;
 	  find_referenced_vars_in (gsi_stmt (si));
 	}
Index: gcc/tree-flow-inline.h
===================================================================
--- gcc/tree-flow-inline.h.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-flow-inline.h	2009-06-10 07:34:10.000000000 -0300
@@ -374,7 +374,7 @@ has_zero_uses (const_tree var)
 
   start = ptr;
   for (ptr = start->next; ptr != start; ptr = ptr->next)
-    if (!IS_DEBUG_STMT (USE_STMT (ptr)))
+    if (!is_gimple_debug (USE_STMT (ptr)))
       return false;
   return true;
 }
@@ -391,13 +391,13 @@ has_single_use (const_tree var)
   ret = (ptr != ptr->next && ptr == ptr->next->next);
 
   if (ret)
-    return !IS_DEBUG_STMT (USE_STMT (ptr->next));
+    return !is_gimple_debug (USE_STMT (ptr->next));
   else if (!MAY_HAVE_DEBUG_STMTS)
     return ret;
 
   start = ptr;
   for (ptr = start->next; ptr != start; ptr = ptr->next)
-    if (!IS_DEBUG_STMT (USE_STMT (ptr)))
+    if (!is_gimple_debug (USE_STMT (ptr)))
       {
 	if (ret)
 	  return false;
@@ -420,13 +420,13 @@ single_imm_use (const_tree var, use_oper
   ret = ptr != ptr->next && ptr == ptr->next->next;
 
   if (ret)
-    ret = !IS_DEBUG_STMT (USE_STMT (ptr->next));
+    ret = !is_gimple_debug (USE_STMT (ptr->next));
   else if (MAY_HAVE_DEBUG_STMTS)
     {
       const ssa_use_operand_t *start = ptr, *prev = ptr, *single_use_prev = 0;
 
       for (ptr = start->next; ptr != start; prev = ptr, ptr = ptr->next)
-	if (!IS_DEBUG_STMT (USE_STMT (ptr)))
+	if (!is_gimple_debug (USE_STMT (ptr)))
 	  {
 	    if (ret)
 	      {
@@ -464,7 +464,7 @@ num_imm_uses (const_tree var)
       num++;
   else
     for (ptr = start->next; ptr != start; ptr = ptr->next)
-      if (!IS_DEBUG_STMT (USE_STMT (ptr)))
+      if (!is_gimple_debug (USE_STMT (ptr)))
 	num++;
 
   return num;
Index: gcc/tree-inline.c
===================================================================
--- gcc/tree-inline.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-inline.c	2009-06-10 07:34:10.000000000 -0300
@@ -1316,7 +1316,7 @@ remap_gimple_stmt (gimple stmt, copy_bod
 	    }
 	}
 
-      if (IS_DEBUG_BIND (stmt))
+      if (gimple_debug_bind_p (stmt))
 	{
 	  copy = gimple_build_debug_bind (VAR_DEBUG_VALUE_VAR (stmt),
 					  VAR_DEBUG_VALUE_VALUE (stmt),
@@ -1343,7 +1343,7 @@ remap_gimple_stmt (gimple stmt, copy_bod
 
   gimple_set_block (copy, new_block);
 
-  if (IS_DEBUG_BIND (copy))
+  if (gimple_debug_bind_p (copy))
     return copy;
 
   /* Remap all the operands in COPY.  */
@@ -1635,7 +1635,7 @@ copy_bb (copy_body_data *id, basic_block
 		add_stmt_to_eh_region (stmt, id->eh_region);
 	    }
 
-	  if (gimple_in_ssa_p (cfun) && !IS_DEBUG_STMT (stmt))
+	  if (gimple_in_ssa_p (cfun) && !is_gimple_debug (stmt))
 	    {
 	      ssa_op_iter i;
 	      tree def;
@@ -1764,7 +1764,7 @@ copy_edges_for_bb (basic_block bb, gcov_
       bool can_throw, nonlocal_goto;
 
       copy_stmt = gsi_stmt (si);
-      if (!IS_DEBUG_STMT (copy_stmt))
+      if (!is_gimple_debug (copy_stmt))
 	{
 	  update_stmt (copy_stmt);
 	  if (gimple_in_ssa_p (cfun))
@@ -2197,7 +2197,7 @@ insert_init_stmt (copy_body_data *id, ba
          from a rhs with a conversion.  Handle that here by forcing the
 	 rhs into a temporary.  gimple_regimplify_operands is not
 	 prepared to do this for us.  */
-      if (!IS_DEBUG_STMT (init_stmt)
+      if (!is_gimple_debug (init_stmt)
 	  && !is_gimple_reg (gimple_assign_lhs (init_stmt))
 	  && is_gimple_reg_type (TREE_TYPE (gimple_assign_lhs (init_stmt)))
 	  && gimple_assign_rhs_class (init_stmt) == GIMPLE_UNARY_RHS)
@@ -2214,7 +2214,7 @@ insert_init_stmt (copy_body_data *id, ba
       gimple_regimplify_operands (init_stmt, &si);
       mark_symbols_for_renaming (init_stmt);
 
-      if (!IS_DEBUG_STMT (init_stmt) && MAY_HAVE_DEBUG_STMTS)
+      if (!is_gimple_debug (init_stmt) && MAY_HAVE_DEBUG_STMTS)
 	{
 	  tree var, def = gimple_assign_lhs (init_stmt);
 
Index: gcc/tree-into-ssa.c
===================================================================
--- gcc/tree-into-ssa.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-into-ssa.c	2009-06-10 07:34:10.000000000 -0300
@@ -763,7 +763,7 @@ mark_def_sites (struct dom_walk_data *wa
   set_register_defs (stmt, false);
   set_rewrite_uses (stmt, false);
 
-  if (IS_DEBUG_STMT (stmt))
+  if (is_gimple_debug (stmt))
     return;
 
   /* If a variable is used before being set, then the variable is live
@@ -1127,7 +1127,7 @@ adjust_debug_stmts_for_var_def_move (tre
       basic_block bb;
       gimple_stmt_iterator si;
 
-      if (!IS_DEBUG_STMT (stmt))
+      if (!is_gimple_debug (stmt))
 	continue;
 
       if (tobb)
@@ -1290,7 +1290,7 @@ check_and_update_debug_stmt (gimple t, b
 {
   struct check_debug_predicate p;
 
-  gcc_assert (IS_DEBUG_STMT (t));
+  gcc_assert (is_gimple_debug (t));
 
   if (VAR_DEBUG_VALUE_VALUE (t) == VAR_DEBUG_VALUE_NOVALUE)
     return;
@@ -2211,11 +2211,11 @@ rewrite_update_stmt (struct dom_walk_dat
 
   /* Rewrite USES included in OLD_SSA_NAMES and USES whose underlying
      symbol is marked for renaming.  */
-  if (rewrite_uses_p (stmt) && !IS_DEBUG_STMT (stmt))
+  if (rewrite_uses_p (stmt) && !is_gimple_debug (stmt))
     FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_ALL_USES)
       maybe_replace_use (use_p);
 
-  else if (rewrite_uses_p (stmt) && IS_DEBUG_STMT (stmt))
+  else if (rewrite_uses_p (stmt) && is_gimple_debug (stmt))
     {
       bool failed = false;
 
@@ -2635,7 +2635,7 @@ mark_use_interesting (tree var, gimple s
     {
       set_rewrite_uses (stmt, true);
 
-      if (IS_DEBUG_STMT (stmt))
+      if (is_gimple_debug (stmt))
 	return;
     }
 
Index: gcc/tree-outof-ssa.c
===================================================================
--- gcc/tree-outof-ssa.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-outof-ssa.c	2009-06-10 07:34:10.000000000 -0300
@@ -111,7 +111,7 @@ set_location_for_edge (edge e)
 	  for (gsi = gsi_last_bb (bb); !gsi_end_p (gsi); gsi_prev (&gsi))
 	    {
 	      gimple stmt = gsi_stmt (gsi);
-	      if (IS_DEBUG_STMT (stmt))
+	      if (is_gimple_debug (stmt))
 		continue;
 	      if (gimple_has_location (stmt) || gimple_block (stmt))
 		{
Index: gcc/tree-parloops.c
===================================================================
--- gcc/tree-parloops.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-parloops.c	2009-06-10 07:34:10.000000000 -0300
@@ -658,7 +658,7 @@ eliminate_local_variables_stmt (edge ent
   dta.decl_address = decl_address;
   dta.changed = false;
 
-  if (IS_DEBUG_BIND (stmt))
+  if (gimple_debug_bind_p (stmt))
     walk_tree (gimple_debug_bind_get_value_ptr (stmt),
 	       eliminate_local_variables_1, &dta.info, NULL);
   else
@@ -1241,7 +1241,7 @@ separate_decls_in_region (edge entry, ed
 	    {
 	      gimple stmt = gsi_stmt (gsi);
 
-	      if (IS_DEBUG_STMT (stmt))
+	      if (is_gimple_debug (stmt))
 		has_debug_stmt = true;
 	      else
 		separate_decls_in_region_stmt (entry, exit, stmt,
@@ -1258,7 +1258,7 @@ separate_decls_in_region (edge entry, ed
 	    {
 	      gimple stmt = gsi_stmt (gsi);
 
-	      if (IS_DEBUG_BIND (stmt))
+	      if (gimple_debug_bind_p (stmt))
 		{
 		  if (separate_decls_in_region_debug_bind (stmt,
 							   name_copies,
@@ -1269,7 +1269,7 @@ separate_decls_in_region (edge entry, ed
 		    }
 		}
 	      else
-		gcc_assert (!IS_DEBUG_STMT (stmt));
+		gcc_assert (!is_gimple_debug (stmt));
 
 	      gsi_next (&gsi);
 	    }
Index: gcc/tree-ssa-coalesce.c
===================================================================
--- gcc/tree-ssa-coalesce.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-ssa-coalesce.c	2009-06-10 07:34:10.000000000 -0300
@@ -884,7 +884,7 @@ build_ssa_conflict_graph (tree_live_info
                   && TREE_CODE (rhs1) == SSA_NAME)
 		live_track_clear_var (live, rhs1);
 	    }
-	  else if (IS_DEBUG_STMT (stmt))
+	  else if (is_gimple_debug (stmt))
 	    continue;
 
 	  FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, SSA_OP_DEF)
@@ -1050,7 +1050,7 @@ create_outofssa_var_map (coalesce_list_p
         {
 	  stmt = gsi_stmt (gsi);
 
-	  if (IS_DEBUG_STMT (stmt))
+	  if (is_gimple_debug (stmt))
 	    continue;
 
 	  /* Register USE and DEF operands in each statement.  */
Index: gcc/tree-ssa-forwprop.c
===================================================================
--- gcc/tree-ssa-forwprop.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-ssa-forwprop.c	2009-06-10 07:34:10.000000000 -0300
@@ -925,7 +925,7 @@ forward_propagate_addr_expr (tree name, 
 	 there is nothing we can do.  */
       if (gimple_code (use_stmt) != GIMPLE_ASSIGN)
 	{
-	  if (IS_DEBUG_STMT (use_stmt))
+	  if (is_gimple_debug (use_stmt))
 	    debug = true;
 	  else
 	    all = false;
Index: gcc/tree-ssa-live.c
===================================================================
--- gcc/tree-ssa-live.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-ssa-live.c	2009-06-10 07:34:10.000000000 -0300
@@ -656,7 +656,7 @@ remove_unused_locals (void)
 	  gimple stmt = gsi_stmt (gsi);
 	  tree b = gimple_block (stmt);
 
-	  if (IS_DEBUG_STMT (stmt))
+	  if (is_gimple_debug (stmt))
 	    continue;
 
 	  if (b)
@@ -945,7 +945,7 @@ set_var_live_on_entry (tree ssa_name, tr
 		add_block = e->src;
 	    }
 	}
-      else if (IS_DEBUG_STMT (use_stmt))
+      else if (is_gimple_debug (use_stmt))
 	continue;
       else
         {
Index: gcc/tree-ssa-loop-ch.c
===================================================================
--- gcc/tree-ssa-loop-ch.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-ssa-loop-ch.c	2009-06-10 07:34:10.000000000 -0300
@@ -90,7 +90,7 @@ should_duplicate_loop_header_p (basic_bl
       if (gimple_code (last) == GIMPLE_LABEL)
 	continue;
 
-      if (IS_DEBUG_STMT (last))
+      if (is_gimple_debug (last))
 	continue;
 
       if (is_gimple_call (last))
Index: gcc/tree-ssa-loop-ivopts.c
===================================================================
--- gcc/tree-ssa-loop-ivopts.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-ssa-loop-ivopts.c	2009-06-10 07:34:10.000000000 -0300
@@ -1837,7 +1837,7 @@ find_interesting_uses (struct ivopts_dat
       for (bsi = gsi_start_phis (bb); !gsi_end_p (bsi); gsi_next (&bsi))
 	find_interesting_uses_stmt (data, gsi_stmt (bsi));
       for (bsi = gsi_start_bb (bb); !gsi_end_p (bsi); gsi_next (&bsi))
-	if (!IS_DEBUG_STMT (gsi_stmt (bsi)))
+	if (!is_gimple_debug (gsi_stmt (bsi)))
 	find_interesting_uses_stmt (data, gsi_stmt (bsi));
     }
 
@@ -5373,7 +5373,7 @@ remove_unused_ivs (struct ivopts_data *d
 
 	      FOR_EACH_IMM_USE_STMT (stmt, iter, info->iv->ssa_name)
 		{
-		  if (!IS_DEBUG_BIND (stmt))
+		  if (!gimple_debug_bind_p (stmt))
 		    continue;
 
 		  /* ??? We can probably do better than this.  */
Index: gcc/tree-ssa-loop-manip.c
===================================================================
--- gcc/tree-ssa-loop-manip.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-ssa-loop-manip.c	2009-06-10 07:34:10.000000000 -0300
@@ -278,7 +278,7 @@ find_uses_to_rename_stmt (gimple stmt, b
   tree var;
   basic_block bb = gimple_bb (stmt);
 
-  if (IS_DEBUG_STMT (stmt))
+  if (is_gimple_debug (stmt))
     return;
 
   FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, SSA_OP_ALL_USES)
@@ -431,7 +431,7 @@ check_loop_closed_ssa_stmt (basic_block 
   ssa_op_iter iter;
   tree var;
 
-  if (IS_DEBUG_STMT (stmt))
+  if (is_gimple_debug (stmt))
     return;
 
   FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, SSA_OP_ALL_USES)
Index: gcc/tree-ssa-operands.c
===================================================================
--- gcc/tree-ssa-operands.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-ssa-operands.c	2009-06-10 07:34:10.000000000 -0300
@@ -1066,9 +1066,9 @@ parse_ssa_operands (gimple stmt)
 
   if (code == GIMPLE_ASM)
     get_asm_expr_operands (stmt);
-  else if (IS_DEBUG_STMT (stmt))
+  else if (is_gimple_debug (stmt))
     {
-      if (IS_DEBUG_BIND (stmt)
+      if (gimple_debug_bind_p (stmt)
 	  && VAR_DEBUG_VALUE_VALUE (stmt) != VAR_DEBUG_VALUE_NOVALUE)
 	get_expr_operands (stmt, &VAR_DEBUG_VALUE_VALUE (stmt),
 			   opf_use | opf_debug_use | opf_no_vops);
Index: gcc/tree-ssa-phiopt.c
===================================================================
--- gcc/tree-ssa-phiopt.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-ssa-phiopt.c	2009-06-10 07:34:10.000000000 -0300
@@ -387,7 +387,7 @@ empty_block_p (basic_block bb)
   gimple_stmt_iterator gsi = gsi_after_labels (bb);
   if (gsi_end_p (gsi))
     return true;
-  if (IS_DEBUG_STMT (gsi_stmt (gsi)))
+  if (is_gimple_debug (gsi_stmt (gsi)))
     gsi_next_nondebug (&gsi);
   return gsi_end_p (gsi);
 }
Index: gcc/tree-ssa-propagate.c
===================================================================
--- gcc/tree-ssa-propagate.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-ssa-propagate.c	2009-06-10 07:34:10.000000000 -0300
@@ -1173,7 +1173,7 @@ substitute_and_fold (prop_value_t *prop_
 
 	      /* Determine what needs to be done to update the SSA form.  */
 	      pop_stmt_changes (gsi_stmt_ptr (&i));
-	      if (!IS_DEBUG_STMT (stmt))
+	      if (!is_gimple_debug (stmt))
 		something_changed = true;
 	    }
 	  else
Index: gcc/tree-ssa-sink.c
===================================================================
--- gcc/tree-ssa-sink.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-ssa-sink.c	2009-06-10 07:34:10.000000000 -0300
@@ -120,7 +120,7 @@ all_immediate_uses_same_place (gimple st
     {
       FOR_EACH_IMM_USE_FAST (use_p, imm_iter, var)
         {
-	  if (IS_DEBUG_STMT (USE_STMT (use_p)))
+	  if (is_gimple_debug (USE_STMT (use_p)))
 	    continue;
 	  if (firstuse == NULL)
 	    firstuse = USE_STMT (use_p);
@@ -229,7 +229,7 @@ nearest_common_dominator_of_uses (gimple
 
 	      useblock = gimple_phi_arg_edge (usestmt, idx)->src;
 	    }
-	  else if (IS_DEBUG_STMT (usestmt))
+	  else if (is_gimple_debug (usestmt))
 	    {
 	      *debug_stmts = true;
 	      continue;
@@ -279,7 +279,7 @@ statement_sink_location (gimple stmt, ba
     {
       FOR_EACH_IMM_USE_FAST (one_use, imm_iter, def)
 	{
-	  if (IS_DEBUG_STMT (USE_STMT (one_use)))
+	  if (is_gimple_debug (USE_STMT (one_use)))
 	    continue;
 
 	  break;
Index: gcc/tree-ssa-ter.c
===================================================================
--- gcc/tree-ssa-ter.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-ssa-ter.c	2009-06-10 07:34:10.000000000 -0300
@@ -585,7 +585,7 @@ find_replaceable_in_bb (temp_expr_table_
     {
       stmt = gsi_stmt (bsi);
 
-      if (IS_DEBUG_STMT (stmt))
+      if (is_gimple_debug (stmt))
 	continue;
 
       stmt_replaceable = is_replaceable_p (stmt);
Index: gcc/tree-ssa-threadedge.c
===================================================================
--- gcc/tree-ssa-threadedge.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-ssa-threadedge.c	2009-06-10 07:34:10.000000000 -0300
@@ -311,7 +311,7 @@ record_temporary_equivalences_from_stmts
       /* Ignore empty statements and labels.  */
       if (gimple_code (stmt) == GIMPLE_NOP
 	  || gimple_code (stmt) == GIMPLE_LABEL
-	  || IS_DEBUG_STMT (stmt))
+	  || is_gimple_debug (stmt))
 	continue;
 
       /* If the statement has volatile operands, then we assume we
Index: gcc/tree-ssa-threadupdate.c
===================================================================
--- gcc/tree-ssa-threadupdate.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-ssa-threadupdate.c	2009-06-10 07:34:10.000000000 -0300
@@ -476,7 +476,7 @@ redirection_block_p (basic_block bb)
   gsi = gsi_start_bb (bb);
   while (!gsi_end_p (gsi)
          && (gimple_code (gsi_stmt (gsi)) == GIMPLE_LABEL
-	     || IS_DEBUG_STMT (gsi_stmt (gsi))
+	     || is_gimple_debug (gsi_stmt (gsi))
              || gimple_nop_p (gsi_stmt (gsi))))
     gsi_next (&gsi);
   
Index: gcc/tree-ssa.c
===================================================================
--- gcc/tree-ssa.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-ssa.c	2009-06-10 07:34:10.000000000 -0300
@@ -632,7 +632,7 @@ verify_ssa (bool check_modified_stmt)
 		  goto err;
 		}
 	    }
-	  else if (IS_DEBUG_BIND (stmt)
+	  else if (gimple_debug_bind_p (stmt)
 		   && VAR_DEBUG_VALUE_VALUE (stmt) == VAR_DEBUG_VALUE_NOVALUE)
 	    continue;
 
@@ -1404,7 +1404,7 @@ warn_uninitialized_vars (bool warn_possi
 	{
 	  struct walk_stmt_info wi;
 	  data.stmt = gsi_stmt (gsi);
-	  if (IS_DEBUG_STMT (data.stmt))
+	  if (is_gimple_debug (data.stmt))
 	    continue;
 	  memset (&wi, 0, sizeof (wi));
 	  wi.info = &data;
Index: gcc/tree-stdarg.c
===================================================================
--- gcc/tree-stdarg.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-stdarg.c	2009-06-10 07:34:10.000000000 -0300
@@ -496,7 +496,7 @@ check_all_va_list_escapes (struct stdarg
 	  tree use;
 	  ssa_op_iter iter;
 
-	  if (IS_DEBUG_STMT (stmt))
+	  if (is_gimple_debug (stmt))
 	    continue;
 
 	  FOR_EACH_SSA_TREE_OPERAND (use, stmt, iter, SSA_OP_ALL_USES)
@@ -840,7 +840,7 @@ execute_optimize_stdarg (void)
 		    continue;
 		}
 	    }
-	  else if (IS_DEBUG_STMT (stmt))
+	  else if (is_gimple_debug (stmt))
 	    continue;
 
 	  /* All other uses of va_list are either va_copy (that is not handled
Index: gcc/tree-tailcall.c
===================================================================
--- gcc/tree-tailcall.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-tailcall.c	2009-06-10 07:34:10.000000000 -0300
@@ -395,7 +395,7 @@ find_tail_calls (basic_block bb, struct 
       stmt = gsi_stmt (gsi);
 
       /* Ignore labels.  */
-      if (gimple_code (stmt) == GIMPLE_LABEL || IS_DEBUG_STMT (stmt))
+      if (gimple_code (stmt) == GIMPLE_LABEL || is_gimple_debug (stmt))
 	continue;
 
       /* Check for a call.  */
@@ -501,7 +501,7 @@ find_tail_calls (basic_block bb, struct 
       if (gimple_code (stmt) == GIMPLE_RETURN)
 	break;
 
-      if (IS_DEBUG_STMT (stmt))
+      if (is_gimple_debug (stmt))
 	continue;
 
       if (gimple_code (stmt) != GIMPLE_ASSIGN)
Index: gcc/tree-vect-loop.c
===================================================================
--- gcc/tree-vect-loop.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-vect-loop.c	2009-06-10 07:34:10.000000000 -0300
@@ -1531,7 +1531,7 @@ vect_is_simple_reduction (loop_vec_info 
   FOR_EACH_IMM_USE_FAST (use_p, imm_iter, name)
     {
       gimple use_stmt = USE_STMT (use_p);
-      if (IS_DEBUG_STMT (use_stmt))
+      if (is_gimple_debug (use_stmt))
 	continue;
       if (flow_bb_inside_loop_p (loop, gimple_bb (use_stmt))
 	  && vinfo_for_stmt (use_stmt)
@@ -1575,7 +1575,7 @@ vect_is_simple_reduction (loop_vec_info 
   FOR_EACH_IMM_USE_FAST (use_p, imm_iter, name)
     {
       gimple use_stmt = USE_STMT (use_p);
-      if (IS_DEBUG_STMT (use_stmt))
+      if (is_gimple_debug (use_stmt))
 	continue;
       if (flow_bb_inside_loop_p (loop, gimple_bb (use_stmt))
 	  && vinfo_for_stmt (use_stmt)
Index: gcc/tree-vrp.c
===================================================================
--- gcc/tree-vrp.c.orig	2009-06-10 07:25:13.000000000 -0300
+++ gcc/tree-vrp.c	2009-06-10 07:34:10.000000000 -0300
@@ -4670,7 +4670,7 @@ find_assert_locations_1 (basic_block bb,
 
       stmt = gsi_stmt (si);
 
-      if (IS_DEBUG_STMT (stmt))
+      if (is_gimple_debug (stmt))
 	continue;
 
       /* See if we can derive an assertion for any of STMT's operands.  */
Index: gcc/tree-if-conv.c
===================================================================
--- gcc/tree-if-conv.c.orig	2009-06-10 05:31:11.000000000 -0300
+++ gcc/tree-if-conv.c	2009-06-10 07:44:22.000000000 -0300
@@ -241,7 +241,7 @@ tree_if_convert_stmt (struct loop *  loo
 
     case GIMPLE_DEBUG:
       /* ??? Should there be conditional VAR_DEBUG_VALUEs?  */
-      if (IS_DEBUG_BIND (gsi_stmt (*gsi)))
+      if (gimple_debug_bind_p (gsi_stmt (*gsi)))
 	{
 	  VAR_DEBUG_VALUE_VALUE (gsi_stmt (*gsi)) = VAR_DEBUG_VALUE_NOVALUE;
 	  update_stmt (gsi_stmt (*gsi));
Index: gcc/tree-ssa-dce.c
===================================================================
--- gcc/tree-ssa-dce.c.orig	2009-06-10 05:31:11.000000000 -0300
+++ gcc/tree-ssa-dce.c	2009-06-10 07:44:22.000000000 -0300
@@ -1009,7 +1009,7 @@ eliminate_unnecessary_stmts (void)
 	    }
 	  else
 	    {
-	      if (IS_DEBUG_BIND (stmt))
+	      if (gimple_debug_bind_p (stmt))
 		{
 		  if (something_changed
 		      && (VAR_DEBUG_VALUE_VALUE (stmt)
Index: gcc/tree-ssa-dom.c
===================================================================
--- gcc/tree-ssa-dom.c.orig	2009-06-10 05:31:11.000000000 -0300
+++ gcc/tree-ssa-dom.c	2009-06-10 07:44:22.000000000 -0300
@@ -2604,7 +2604,7 @@ propagate_rhs_into_lhs (gimple stmt, tre
 	      discard_stmt_changes (&use_stmt);
 	      continue;
 	    }
-	  else if (IS_DEBUG_BIND (use_stmt))
+	  else if (gimple_debug_bind_p (use_stmt))
 	    check_and_update_debug_stmt (use_stmt, NULL);
 
 	  /* From this point onward we are propagating into a 
Index: gcc/rtl.h
===================================================================
--- gcc/rtl.h.orig	2009-06-05 03:53:40.000000000 -0300
+++ gcc/rtl.h	2009-06-10 07:45:27.000000000 -0300
@@ -392,7 +392,7 @@ struct GTY(()) rtvec_def {
 #define NONDEBUG_INSN_P(X) (INSN_P (X) && !DEBUG_INSN_P (X))
 
 /* Nonzero if DEBUG_INSN_P may possibly hold.  */
-#define MAY_HAVE_DEBUG_INSNS (flag_var_tracking_assignments)
+#define MAY_HAVE_DEBUG_INSNS MAY_HAVE_DEBUG_STMTS
 
 /* Predicate yielding nonzero iff X is a real insn.  */
 #define INSN_P(X) \
for  gcc/ChangeLog.vta
from  Alexandre Oliva  <aoliva@redhat.com>

	* tree.h (IS_DEBUG_STMT): Removed.  Replace with is_gimple_debug.
	(IS_DEBUG_BIND): Removed.  Replace with gimple_debug_bind_p.
	* doc/gimple.texi (is_gimple_debug): New.
	(gimple_debug_bind_p): New.
	(is_gimple_call, gimple_assign_cast_p): End sentence with period.
	* gimple.h: Adjust.
	(is_gimple_debug, gimple_debug_bind_p): New.
	(gimple_debug_bind_get_var, gimple_debug_bind_get_value): Use them.
	(gimple_debug_bind_get_value_ptr, gimple_debug_bind_set_var): Ditto.
	(gimple_debug_bind_set_value): Likewise.
	* cfgexpand.c: Adjust.
	* gimple-pretty-print.c: Adjust.
	* gimple.c: Adjust.
	* ipa-reference.c: Adjust.
	* tree-cfg.c: Adjust.
	* tree-cfgcleanup.c: Adjust.
	* tree-dfa.c: Adjust.
	* tree-flow-inline.h: Adjust.
	* tree-inline.c: Adjust.
	* tree-into-ssa.c: Adjust.
	* tree-outof-ssa.c: Adjust.
	* tree-parloops.c: Adjust.
	* tree-ssa-forwprop.c: Adjust.
	* tree-ssa-live.c: Adjust.
	* tree-ssa-loop-ch.c: Adjust.
	* tree-ssa-loop-ivopts.c: Adjust.
	* tree-ssa-loop-manip.c: Adjust.
	* tree-ssa-operands.c: Adjust.
	* tree-ssa-phiopt.c: Adjust.
	* tree-ssa-propagate.c: Adjust.
	* tree-ssa-sink.c: Adjust.
	* tree-ssa-ter.c: Adjust.
	* tree-ssa-threadedge.c: Adjust.
	* tree-ssa-threadupdate.c: Adjust.
	* tree-ssa.c: Adjust.
	* tree-stdarg.c: Adjust.
	* tree-tailcall.c: Adjust.
	* tree-vrp.c: Adjust.
	* tree-if-conv.c: Adjust.
	* tree-ssa-dce.c: Adjust.
	* tree-ssa-dom.c: Adjust
	* rtl.h (MAY_HAVE_DEBUG_INSNS): Alias to MAY_HAVE_DEBUG_STMTS.

Index: gcc/tree.h
===================================================================
--- gcc/tree.h.orig	2009-05-08 05:42:59.000000000 -0300
+++ gcc/tree.h	2009-06-11 05:24:10.000000000 -0300
@@ -1545,16 +1545,6 @@ struct tree_constructor GTY(())
 				 && VOID_TYPE_P (TREE_TYPE (NODE)) \
 				 && integer_zerop (TREE_OPERAND (NODE, 0)))
 
-/* Nonzero if NODE is a debug statement.  */
-#define IS_DEBUG_STMT(NODE)     (gimple_code (NODE) == GIMPLE_DEBUG)
-
-/* Nonzero if NODE is a debug bind statement.  */
-#define IS_DEBUG_BIND(NODE)	(IS_DEBUG_STMT (NODE) && \
-				 (NODE)->gsbase.subcode == VAR_DEBUG_VALUE)
-
-/* Nonzero if IS_DEBUG_STMT may possibly.  */
-#define MAY_HAVE_DEBUG_STMTS    (flag_var_tracking_assignments)
-
 /* In ordinary expression nodes.  */
 #define TREE_OPERAND_LENGTH(NODE) tree_operand_length (NODE)
 #define TREE_OPERAND(NODE, I) TREE_OPERAND_CHECK (NODE, I)
@@ -1567,6 +1557,9 @@ struct tree_constructor GTY(())
 #define VL_EXP_OPERAND_LENGTH(NODE) \
   ((int)TREE_INT_CST_LOW (VL_EXP_CHECK (NODE)->exp.operands[0]))
 
+/* Nonzero if is_gimple_debug() may possibly hold.  */
+#define MAY_HAVE_DEBUG_STMTS    (flag_var_tracking_assignments)
+
 /* The second operand of a VAR_DEBUG_VALUE when the value was
    optimized away.  */
 #define VAR_DEBUG_VALUE_NOVALUE NULL_TREE /* error_mark_node */
Index: gcc/doc/gimple.texi
===================================================================
--- gcc/doc/gimple.texi.orig	2009-03-01 04:20:14.000000000 -0300
+++ gcc/doc/gimple.texi	2009-06-11 05:24:10.000000000 -0300
@@ -692,12 +692,21 @@ Return true if the code of g is @code{GI
 @end deftypefn
  
 @deftypefn {GIMPLE function} is_gimple_call (gimple g)
-Return true if the code of g is @code{GIMPLE_CALL}
+Return true if the code of g is @code{GIMPLE_CALL}.
 @end deftypefn
  
+@deftypefn {GIMPLE function} is_gimple_debug (gimple g)
+Return true if the code of g is @code{GIMPLE_DEBUG}.
+@end deftypefn
+
 @deftypefn {GIMPLE function} gimple_assign_cast_p (gimple g)
 Return true if g is a @code{GIMPLE_ASSIGN} that performs a type cast
-operation
+operation.
+@end deftypefn
+
+@deftypefn {GIMPLE function} gimple_debug_bind_p (gimple g)
+Return true if g is a @code{GIMPLE_DEBUG} that binds the value of an
+expression to a variable.
 @end deftypefn
 
 @node Manipulating GIMPLE statements
Index: gcc/gimple.h
===================================================================
--- gcc/gimple.h.orig	2009-03-01 04:35:52.000000000 -0300
+++ gcc/gimple.h	2009-06-11 05:24:10.000000000 -0300
@@ -3234,6 +3234,24 @@ gimple_switch_set_default_label (gimple 
   gimple_switch_set_label (gs, 0, label);
 }
 
+/* Return true if GS is a GIMPLE_DEBUG statement.  */
+
+static inline bool
+is_gimple_debug (const_gimple gs)
+{
+  return gimple_code (gs) == GIMPLE_DEBUG;
+}
+
+/* Return true if S is a GIMPLE_DEBUG BIND statement.  */
+
+static inline bool
+gimple_debug_bind_p (const_gimple s)
+{
+  if (is_gimple_debug (s))
+    return s->gsbase.subcode == VAR_DEBUG_VALUE;
+
+  return false;
+}
 
 /* Return the variable bound in a GIMPLE_DEBUG bind statement.  */
 
@@ -3241,7 +3259,7 @@ static inline tree
 gimple_debug_bind_get_var (gimple dbg)
 {
   GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
-  gcc_assert (dbg->gsbase.subcode == VAR_DEBUG_VALUE);
+  gcc_assert (gimple_debug_bind_p (dbg));
   return gimple_op (dbg, 0);
 }
 
@@ -3252,7 +3270,7 @@ static inline tree
 gimple_debug_bind_get_value (gimple dbg)
 {
   GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
-  gcc_assert (dbg->gsbase.subcode == VAR_DEBUG_VALUE);
+  gcc_assert (gimple_debug_bind_p (dbg));
   return gimple_op (dbg, 1);
 }
 
@@ -3263,7 +3281,7 @@ static inline tree *
 gimple_debug_bind_get_value_ptr (gimple dbg)
 {
   GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
-  gcc_assert (dbg->gsbase.subcode == VAR_DEBUG_VALUE);
+  gcc_assert (gimple_debug_bind_p (dbg));
   return gimple_op_ptr (dbg, 1);
 }
 
@@ -3273,7 +3291,7 @@ static inline void
 gimple_debug_bind_set_var (gimple dbg, tree var)
 {
   GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
-  gcc_assert (dbg->gsbase.subcode == VAR_DEBUG_VALUE);
+  gcc_assert (gimple_debug_bind_p (dbg));
   gimple_set_op (dbg, 0, var);
 }
 
@@ -3284,7 +3302,7 @@ static inline void
 gimple_debug_bind_set_value (gimple dbg, tree value)
 {
   GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
-  gcc_assert (dbg->gsbase.subcode == VAR_DEBUG_VALUE);
+  gcc_assert (gimple_debug_bind_p (dbg));
   gimple_set_op (dbg, 1, value);
 }
 
@@ -4469,7 +4487,7 @@ gsi_next_nondebug (gimple_stmt_iterator 
 {
   do
     gsi_next (i);
-  while (!gsi_end_p (*i) && IS_DEBUG_STMT (gsi_stmt (*i)));
+  while (!gsi_end_p (*i) && is_gimple_debug (gsi_stmt (*i)));
 }
 
 /* Advance the iterator to the next non-debug gimple statement.  */
@@ -4479,7 +4497,7 @@ gsi_prev_nondebug (gimple_stmt_iterator 
 {
   do
     gsi_prev (i);
-  while (!gsi_end_p (*i) && IS_DEBUG_STMT (gsi_stmt (*i)));
+  while (!gsi_end_p (*i) && is_gimple_debug (gsi_stmt (*i)));
 }
 
 /* Return a new iterator pointing to the first non-debug statement in
@@ -4490,7 +4508,7 @@ gsi_start_nondebug_bb (basic_block bb)
 {
   gimple_stmt_iterator i = gsi_start_bb (bb);
 
-  if (!gsi_end_p (i) && IS_DEBUG_STMT (gsi_stmt (i)))
+  if (!gsi_end_p (i) && is_gimple_debug (gsi_stmt (i)))
     gsi_next_nondebug (&i);
 
   return i;
@@ -4504,7 +4522,7 @@ gsi_last_nondebug_bb (basic_block bb)
 {
   gimple_stmt_iterator i = gsi_last_bb (bb);
 
-  if (!gsi_end_p (i) && IS_DEBUG_STMT (gsi_stmt (i)))
+  if (!gsi_end_p (i) && is_gimple_debug (gsi_stmt (i)))
     gsi_prev_nondebug (&i);
 
   return i;
Index: gcc/cfgexpand.c
===================================================================
--- gcc/cfgexpand.c.orig	2009-05-15 04:33:31.000000000 -0300
+++ gcc/cfgexpand.c	2009-06-11 05:24:10.000000000 -0300
@@ -2720,7 +2720,7 @@ expand_gimple_basic_block (basic_block b
 	  if (new_bb)
 	    return new_bb;
 	}
-      else if (IS_DEBUG_STMT (stmt))
+      else if (is_gimple_debug (stmt))
 	{
 	  location_t sloc = get_curr_insn_source_location ();
 	  tree sblock = get_curr_insn_block ();
@@ -2776,7 +2776,7 @@ expand_gimple_basic_block (basic_block b
 	      if (gsi_end_p (nsi))
 		break;
 	      stmt = gsi_stmt (nsi);
-	      if (!IS_DEBUG_STMT (stmt))
+	      if (!is_gimple_debug (stmt))
 		break;
 	    }
 
Index: gcc/gimple-pretty-print.c
===================================================================
--- gcc/gimple-pretty-print.c.orig	2009-03-01 04:32:15.000000000 -0300
+++ gcc/gimple-pretty-print.c	2009-06-11 05:24:10.000000000 -0300
@@ -1687,7 +1687,7 @@ dump_bb_header (pretty_printer *buffer, 
 	  gimple_stmt_iterator gsi;
 
 	  for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
-	    if (!IS_DEBUG_STMT (gsi_stmt (gsi))
+	    if (!is_gimple_debug (gsi_stmt (gsi))
 		&& get_lineno (gsi_stmt (gsi)) != UNKNOWN_LOCATION)
 	      {
 		pp_string (buffer, ", starting at line ");
Index: gcc/gimple.c
===================================================================
--- gcc/gimple.c.orig	2008-12-10 03:19:32.000000000 -0200
+++ gcc/gimple.c	2009-06-11 05:24:10.000000000 -0300
@@ -1253,7 +1253,7 @@ empty_body_p (gimple_seq body)
     return true;
   for (i = gsi_start (body); !gsi_end_p (i); gsi_next (&i))
     if (!empty_stmt_p (gsi_stmt (i))
-	&& !IS_DEBUG_STMT (gsi_stmt (i)))
+	&& !is_gimple_debug (gsi_stmt (i)))
       return false;
 
   return true;
@@ -2274,7 +2274,7 @@ gimple_has_side_effects (const_gimple s)
 {
   unsigned i;
 
-  if (IS_DEBUG_STMT (s))
+  if (is_gimple_debug (s))
     return false;
 
   /* We don't have to scan the arguments to check for
@@ -2370,7 +2370,7 @@ gimple_rhs_has_side_effects (const_gimpl
 	    return true;
 	  }
     }
-  else if (IS_DEBUG_STMT (s))
+  else if (is_gimple_debug (s))
     return false;
   else
     {
Index: gcc/ipa-reference.c
===================================================================
--- gcc/ipa-reference.c.orig	2008-10-29 17:28:45.000000000 -0200
+++ gcc/ipa-reference.c	2009-06-11 05:24:10.000000000 -0300
@@ -430,7 +430,7 @@ scan_stmt_for_static_refs (gimple_stmt_i
   unsigned int i;
   bitmap_iterator bi;
 
-  if (IS_DEBUG_STMT (stmt))
+  if (is_gimple_debug (stmt))
     return NULL;
 
   if (fn)
Index: gcc/tree-cfg.c
===================================================================
--- gcc/tree-cfg.c.orig	2009-05-19 03:23:59.000000000 -0300
+++ gcc/tree-cfg.c	2009-06-11 05:24:10.000000000 -0300
@@ -2677,7 +2677,7 @@ first_stmt (basic_block bb)
   gimple_stmt_iterator i = gsi_start_bb (bb);
   gimple stmt = NULL;
 
-  while (!gsi_end_p (i) && IS_DEBUG_STMT ((stmt = gsi_stmt (i))))
+  while (!gsi_end_p (i) && is_gimple_debug ((stmt = gsi_stmt (i))))
     {
       gsi_next (&i);
       stmt = NULL;
@@ -2693,7 +2693,7 @@ last_stmt (basic_block bb)
   gimple_stmt_iterator i = gsi_last_bb (bb);
   gimple stmt = NULL;
 
-  while (!gsi_end_p (i) && IS_DEBUG_STMT ((stmt = gsi_stmt (i))))
+  while (!gsi_end_p (i) && is_gimple_debug ((stmt = gsi_stmt (i))))
     {
       gsi_prev (&i);
       stmt = NULL;
@@ -4090,7 +4090,7 @@ verify_stmt (gimple_stmt_iterator *gsi)
 	}
     }
 
-  if (IS_DEBUG_STMT (stmt))
+  if (is_gimple_debug (stmt))
     {
       check_and_update_debug_stmt (stmt, NULL);
       return false;
Index: gcc/tree-cfgcleanup.c
===================================================================
--- gcc/tree-cfgcleanup.c.orig	2008-12-10 03:13:49.000000000 -0200
+++ gcc/tree-cfgcleanup.c	2009-06-11 05:24:10.000000000 -0300
@@ -440,7 +440,7 @@ remove_forwarder_block (basic_block bb)
 	{
 	  label = gsi_stmt (gsi);
 	  gcc_assert (gimple_code (label) == GIMPLE_LABEL
-		      || IS_DEBUG_STMT (label));
+		      || is_gimple_debug (label));
 	  gsi_remove (&gsi, false);
 	  gsi_insert_before (&gsi_to, label, GSI_SAME_STMT);
 	}
Index: gcc/tree-dfa.c
===================================================================
--- gcc/tree-dfa.c.orig	2009-05-08 05:44:19.000000000 -0300
+++ gcc/tree-dfa.c	2009-06-11 05:24:10.000000000 -0300
@@ -91,7 +91,7 @@ find_referenced_vars (void)
 	{
 	  size_t i;
 	  gimple stmt = gsi_stmt (si);
-	  if (IS_DEBUG_STMT (stmt))
+	  if (is_gimple_debug (stmt))
 	    continue;
 	  for (i = 0; i < gimple_num_ops (stmt); i++)
 	    walk_tree (gimple_op_ptr (stmt, i), find_vars_r, NULL, NULL);
Index: gcc/tree-flow-inline.h
===================================================================
--- gcc/tree-flow-inline.h.orig	2008-12-10 03:13:38.000000000 -0200
+++ gcc/tree-flow-inline.h	2009-06-11 05:24:10.000000000 -0300
@@ -445,7 +445,7 @@ has_zero_uses (const_tree var)
 
   start = ptr;
   for (ptr = start->next; ptr != start; ptr = ptr->next)
-    if (!IS_DEBUG_STMT (USE_STMT (ptr)))
+    if (!is_gimple_debug (USE_STMT (ptr)))
       return false;
   return true;
 }
@@ -462,13 +462,13 @@ has_single_use (const_tree var)
   ret = (ptr != ptr->next && ptr == ptr->next->next);
 
   if (ret)
-    return !IS_DEBUG_STMT (USE_STMT (ptr->next));
+    return !is_gimple_debug (USE_STMT (ptr->next));
   else if (!MAY_HAVE_DEBUG_STMTS)
     return ret;
 
   start = ptr;
   for (ptr = start->next; ptr != start; ptr = ptr->next)
-    if (!IS_DEBUG_STMT (USE_STMT (ptr)))
+    if (!is_gimple_debug (USE_STMT (ptr)))
       {
 	if (ret)
 	  return false;
@@ -491,13 +491,13 @@ single_imm_use (const_tree var, use_oper
   ret = ptr != ptr->next && ptr == ptr->next->next;
 
   if (ret)
-    ret = !IS_DEBUG_STMT (USE_STMT (ptr->next));
+    ret = !is_gimple_debug (USE_STMT (ptr->next));
   else if (MAY_HAVE_DEBUG_STMTS)
     {
       const ssa_use_operand_t *start = ptr, *prev = ptr, *single_use_prev = 0;
 
       for (ptr = start->next; ptr != start; prev = ptr, ptr = ptr->next)
-	if (!IS_DEBUG_STMT (USE_STMT (ptr)))
+	if (!is_gimple_debug (USE_STMT (ptr)))
 	  {
 	    if (ret)
 	      {
@@ -535,7 +535,7 @@ num_imm_uses (const_tree var)
       num++;
   else
     for (ptr = start->next; ptr != start; ptr = ptr->next)
-      if (!IS_DEBUG_STMT (USE_STMT (ptr)))
+      if (!is_gimple_debug (USE_STMT (ptr)))
 	num++;
 
   return num;
Index: gcc/tree-inline.c
===================================================================
--- gcc/tree-inline.c.orig	2009-05-27 02:05:04.000000000 -0300
+++ gcc/tree-inline.c	2009-06-11 05:24:10.000000000 -0300
@@ -1309,7 +1309,7 @@ remap_gimple_stmt (gimple stmt, copy_bod
 	    }
 	}
 
-      if (IS_DEBUG_BIND (stmt))
+      if (gimple_debug_bind_p (stmt))
 	{
 	  copy = gimple_build_debug_bind (VAR_DEBUG_VALUE_VAR (stmt),
 					  VAR_DEBUG_VALUE_VALUE (stmt),
@@ -1336,7 +1336,7 @@ remap_gimple_stmt (gimple stmt, copy_bod
 
   gimple_set_block (copy, new_block);
 
-  if (IS_DEBUG_BIND (copy))
+  if (gimple_debug_bind_p (copy))
     return copy;
 
   /* Remap all the operands in COPY.  */
@@ -1597,7 +1597,7 @@ copy_bb (copy_body_data *id, basic_block
 		add_stmt_to_eh_region (stmt, id->eh_region);
 	    }
 
-	  if (gimple_in_ssa_p (cfun) && !IS_DEBUG_STMT (stmt))
+	  if (gimple_in_ssa_p (cfun) && !is_gimple_debug (stmt))
 	    {
 	      ssa_op_iter i;
 	      tree def;
@@ -1727,7 +1727,7 @@ copy_edges_for_bb (basic_block bb, gcov_
       bool can_throw, nonlocal_goto;
 
       copy_stmt = gsi_stmt (si);
-      if (!IS_DEBUG_STMT (copy_stmt))
+      if (!is_gimple_debug (copy_stmt))
 	{
 	  update_stmt (copy_stmt);
 	  if (gimple_in_ssa_p (cfun))
@@ -2160,7 +2160,7 @@ insert_init_stmt (copy_body_data *id, ba
          from a rhs with a conversion.  Handle that here by forcing the
 	 rhs into a temporary.  gimple_regimplify_operands is not
 	 prepared to do this for us.  */
-      if (!IS_DEBUG_STMT (init_stmt)
+      if (!is_gimple_debug (init_stmt)
 	  && !is_gimple_reg (gimple_assign_lhs (init_stmt))
 	  && is_gimple_reg_type (TREE_TYPE (gimple_assign_lhs (init_stmt)))
 	  && gimple_assign_rhs_class (init_stmt) == GIMPLE_UNARY_RHS)
@@ -2177,7 +2177,7 @@ insert_init_stmt (copy_body_data *id, ba
       gimple_regimplify_operands (init_stmt, &si);
       mark_symbols_for_renaming (init_stmt);
 
-      if (!IS_DEBUG_STMT (init_stmt) && MAY_HAVE_DEBUG_STMTS)
+      if (!is_gimple_debug (init_stmt) && MAY_HAVE_DEBUG_STMTS)
 	{
 	  tree var, def = gimple_assign_lhs (init_stmt);
 
Index: gcc/tree-into-ssa.c
===================================================================
--- gcc/tree-into-ssa.c.orig	2008-10-10 09:31:04.000000000 -0300
+++ gcc/tree-into-ssa.c	2009-06-11 05:27:09.000000000 -0300
@@ -776,7 +776,7 @@ mark_def_sites (struct dom_walk_data *wa
   set_register_defs (stmt, false);
   set_rewrite_uses (stmt, false);
 
-  if (IS_DEBUG_STMT (stmt))
+  if (is_gimple_debug (stmt))
     return;
 
   /* If a variable is used before being set, then the variable is live
@@ -1140,7 +1140,7 @@ adjust_debug_stmts_for_var_def_move (tre
       basic_block bb;
       gimple_stmt_iterator si;
 
-      if (!IS_DEBUG_STMT (stmt))
+      if (!is_gimple_debug (stmt))
 	continue;
 
       if (tobb)
@@ -1303,7 +1303,7 @@ check_and_update_debug_stmt (gimple t, b
 {
   struct check_debug_predicate p;
 
-  gcc_assert (IS_DEBUG_STMT (t));
+  gcc_assert (is_gimple_debug (t));
 
   if (VAR_DEBUG_VALUE_VALUE (t) == VAR_DEBUG_VALUE_NOVALUE)
     return;
@@ -2222,7 +2222,7 @@ rewrite_update_stmt (struct dom_walk_dat
 
   /* Rewrite USES included in OLD_SSA_NAMES and USES whose underlying
      symbol is marked for renaming.  */
-  if (rewrite_uses_p (stmt) && !IS_DEBUG_STMT (stmt))
+  if (rewrite_uses_p (stmt) && !is_gimple_debug (stmt))
     {
       FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_USE)
 	maybe_replace_use (use_p);
@@ -2231,7 +2231,7 @@ rewrite_update_stmt (struct dom_walk_dat
 	FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_VIRTUAL_USES)
 	  maybe_replace_use (use_p);
     }
-  else if (rewrite_uses_p (stmt) && IS_DEBUG_STMT (stmt))
+  else if (rewrite_uses_p (stmt) && is_gimple_debug (stmt))
     {
       bool failed = false;
 
@@ -2664,7 +2664,7 @@ mark_use_interesting (tree var, gimple s
     {
       set_rewrite_uses (stmt, true);
 
-      if (IS_DEBUG_STMT (stmt))
+      if (is_gimple_debug (stmt))
 	return;
     }
 
Index: gcc/tree-parloops.c
===================================================================
--- gcc/tree-parloops.c.orig	2009-05-08 05:44:00.000000000 -0300
+++ gcc/tree-parloops.c	2009-06-11 05:24:11.000000000 -0300
@@ -658,7 +658,7 @@ eliminate_local_variables_stmt (edge ent
   dta.decl_address = decl_address;
   dta.changed = false;
 
-  if (IS_DEBUG_BIND (stmt))
+  if (gimple_debug_bind_p (stmt))
     walk_tree (gimple_debug_bind_get_value_ptr (stmt),
 	       eliminate_local_variables_1, &dta.info, NULL);
   else
@@ -1241,7 +1241,7 @@ separate_decls_in_region (edge entry, ed
 	    {
 	      gimple stmt = gsi_stmt (gsi);
 
-	      if (IS_DEBUG_STMT (stmt))
+	      if (is_gimple_debug (stmt))
 		has_debug_stmt = true;
 	      else
 		separate_decls_in_region_stmt (entry, exit, stmt,
@@ -1258,7 +1258,7 @@ separate_decls_in_region (edge entry, ed
 	    {
 	      gimple stmt = gsi_stmt (gsi);
 
-	      if (IS_DEBUG_BIND (stmt))
+	      if (gimple_debug_bind_p (stmt))
 		{
 		  if (separate_decls_in_region_debug_bind (stmt,
 							   name_copies,
@@ -1269,7 +1269,7 @@ separate_decls_in_region (edge entry, ed
 		    }
 		}
 	      else
-		gcc_assert (!IS_DEBUG_STMT (stmt));
+		gcc_assert (!is_gimple_debug (stmt));
 
 	      gsi_next (&gsi);
 	    }
Index: gcc/tree-ssa-coalesce.c
===================================================================
--- gcc/tree-ssa-coalesce.c.orig	2009-03-01 04:34:28.000000000 -0300
+++ gcc/tree-ssa-coalesce.c	2009-06-11 05:24:11.000000000 -0300
@@ -862,7 +862,7 @@ build_ssa_conflict_graph (tree_live_info
                   && TREE_CODE (rhs1) == SSA_NAME)
 		live_track_clear_var (live, rhs1);
 	    }
-	  else if (IS_DEBUG_STMT (stmt))
+	  else if (is_gimple_debug (stmt))
 	    continue;
 
 	  FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, SSA_OP_DEF)
@@ -1028,7 +1028,7 @@ create_outofssa_var_map (coalesce_list_p
         {
 	  stmt = gsi_stmt (gsi);
 
-	  if (IS_DEBUG_STMT (stmt))
+	  if (is_gimple_debug (stmt))
 	    continue;
 
 	  /* Register USE and DEF operands in each statement.  */
Index: gcc/tree-ssa-forwprop.c
===================================================================
--- gcc/tree-ssa-forwprop.c.orig	2009-03-01 04:34:57.000000000 -0300
+++ gcc/tree-ssa-forwprop.c	2009-06-11 05:24:11.000000000 -0300
@@ -880,7 +880,7 @@ forward_propagate_addr_expr (tree name, 
 	 there is nothing we can do.  */
       if (gimple_code (use_stmt) != GIMPLE_ASSIGN)
 	{
-	  if (IS_DEBUG_STMT (use_stmt))
+	  if (is_gimple_debug (use_stmt))
 	    debug = true;
 	  else
 	    all = false;
Index: gcc/tree-ssa-live.c
===================================================================
--- gcc/tree-ssa-live.c.orig	2009-05-27 02:07:12.000000000 -0300
+++ gcc/tree-ssa-live.c	2009-06-11 05:24:11.000000000 -0300
@@ -713,7 +713,7 @@ remove_unused_locals (void)
 	  gimple stmt = gsi_stmt (gsi);
 	  tree b = gimple_block (stmt);
 
-	  if (IS_DEBUG_STMT (stmt))
+	  if (is_gimple_debug (stmt))
 	    continue;
 
 	  if (b)
@@ -1004,7 +1004,7 @@ set_var_live_on_entry (tree ssa_name, tr
 		add_block = e->src;
 	    }
 	}
-      else if (IS_DEBUG_STMT (use_stmt))
+      else if (is_gimple_debug (use_stmt))
 	continue;
       else
         {
Index: gcc/tree-ssa-loop-ch.c
===================================================================
--- gcc/tree-ssa-loop-ch.c.orig	2009-03-01 04:20:44.000000000 -0300
+++ gcc/tree-ssa-loop-ch.c	2009-06-11 05:24:11.000000000 -0300
@@ -90,7 +90,7 @@ should_duplicate_loop_header_p (basic_bl
       if (gimple_code (last) == GIMPLE_LABEL)
 	continue;
 
-      if (IS_DEBUG_STMT (last))
+      if (is_gimple_debug (last))
 	continue;
 
       if (is_gimple_call (last))
Index: gcc/tree-ssa-loop-ivopts.c
===================================================================
--- gcc/tree-ssa-loop-ivopts.c.orig	2009-05-08 05:43:54.000000000 -0300
+++ gcc/tree-ssa-loop-ivopts.c	2009-06-11 05:24:11.000000000 -0300
@@ -1837,7 +1837,7 @@ find_interesting_uses (struct ivopts_dat
       for (bsi = gsi_start_phis (bb); !gsi_end_p (bsi); gsi_next (&bsi))
 	find_interesting_uses_stmt (data, gsi_stmt (bsi));
       for (bsi = gsi_start_bb (bb); !gsi_end_p (bsi); gsi_next (&bsi))
-	if (!IS_DEBUG_STMT (gsi_stmt (bsi)))
+	if (!is_gimple_debug (gsi_stmt (bsi)))
 	find_interesting_uses_stmt (data, gsi_stmt (bsi));
     }
 
@@ -5433,7 +5433,7 @@ remove_unused_ivs (struct ivopts_data *d
 
 	      FOR_EACH_IMM_USE_STMT (stmt, iter, info->iv->ssa_name)
 		{
-		  if (!IS_DEBUG_BIND (stmt))
+		  if (!gimple_debug_bind_p (stmt))
 		    continue;
 
 		  /* ??? We can probably do better than this.  */
Index: gcc/tree-ssa-loop-manip.c
===================================================================
--- gcc/tree-ssa-loop-manip.c.orig	2009-03-01 04:20:43.000000000 -0300
+++ gcc/tree-ssa-loop-manip.c	2009-06-11 05:24:11.000000000 -0300
@@ -276,7 +276,7 @@ find_uses_to_rename_stmt (gimple stmt, b
   tree var;
   basic_block bb = gimple_bb (stmt);
 
-  if (IS_DEBUG_STMT (stmt))
+  if (is_gimple_debug (stmt))
     return;
 
   FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, SSA_OP_ALL_USES)
@@ -429,7 +429,7 @@ check_loop_closed_ssa_stmt (basic_block 
   ssa_op_iter iter;
   tree var;
 
-  if (IS_DEBUG_STMT (stmt))
+  if (is_gimple_debug (stmt))
     return;
 
   FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, SSA_OP_ALL_USES)
Index: gcc/tree-ssa-operands.c
===================================================================
--- gcc/tree-ssa-operands.c.orig	2008-12-10 03:28:11.000000000 -0200
+++ gcc/tree-ssa-operands.c	2009-06-11 05:28:21.000000000 -0300
@@ -639,7 +639,7 @@ add_vop (gimple stmt, tree op, int num, 
   voptype_p new_vop;
   int x;
 
-  gcc_assert (!IS_DEBUG_STMT (stmt));
+  gcc_assert (!is_gimple_debug (stmt));
 
   new_vop = alloc_vop (num);
   for (x = 0; x < num; x++)
@@ -2107,9 +2107,9 @@ parse_ssa_operands (gimple stmt)
 
   if (code == GIMPLE_ASM)
     get_asm_expr_operands (stmt);
-  else if (IS_DEBUG_STMT (stmt))
+  else if (is_gimple_debug (stmt))
     {
-      if (IS_DEBUG_BIND (stmt)
+      if (gimple_debug_bind_p (stmt)
 	  && VAR_DEBUG_VALUE_VALUE (stmt) != VAR_DEBUG_VALUE_NOVALUE)
 	get_expr_operands (stmt, &VAR_DEBUG_VALUE_VALUE (stmt),
 			   opf_use | opf_debug_use | opf_no_vops);
Index: gcc/tree-ssa-phiopt.c
===================================================================
--- gcc/tree-ssa-phiopt.c.orig	2008-07-31 16:17:00.000000000 -0300
+++ gcc/tree-ssa-phiopt.c	2009-06-11 05:24:11.000000000 -0300
@@ -387,7 +387,7 @@ empty_block_p (basic_block bb)
   gimple_stmt_iterator gsi = gsi_after_labels (bb);
   if (gsi_end_p (gsi))
     return true;
-  if (IS_DEBUG_STMT (gsi_stmt (gsi)))
+  if (is_gimple_debug (gsi_stmt (gsi)))
     gsi_next_nondebug (&gsi);
   return gsi_end_p (gsi);
 }
Index: gcc/tree-ssa-propagate.c
===================================================================
--- gcc/tree-ssa-propagate.c.orig	2008-10-10 09:31:05.000000000 -0300
+++ gcc/tree-ssa-propagate.c	2009-06-11 05:24:11.000000000 -0300
@@ -1200,7 +1200,7 @@ substitute_and_fold (prop_value_t *prop_
 
 	      /* Determine what needs to be done to update the SSA form.  */
 	      pop_stmt_changes (gsi_stmt_ptr (&i));
-	      if (!IS_DEBUG_STMT (stmt))
+	      if (!is_gimple_debug (stmt))
 		something_changed = true;
 	    }
 	  else
Index: gcc/tree-ssa-sink.c
===================================================================
--- gcc/tree-ssa-sink.c.orig	2009-03-01 05:24:41.000000000 -0300
+++ gcc/tree-ssa-sink.c	2009-06-11 05:24:11.000000000 -0300
@@ -120,7 +120,7 @@ all_immediate_uses_same_place (gimple st
     {
       FOR_EACH_IMM_USE_FAST (use_p, imm_iter, var)
         {
-	  if (IS_DEBUG_STMT (USE_STMT (use_p)))
+	  if (is_gimple_debug (USE_STMT (use_p)))
 	    continue;
 	  if (firstuse == NULL)
 	    firstuse = USE_STMT (use_p);
@@ -229,7 +229,7 @@ nearest_common_dominator_of_uses (gimple
 
 	      useblock = gimple_phi_arg_edge (usestmt, idx)->src;
 	    }
-	  else if (IS_DEBUG_STMT (usestmt))
+	  else if (is_gimple_debug (usestmt))
 	    {
 	      *debug_stmts = true;
 	      continue;
@@ -279,7 +279,7 @@ statement_sink_location (gimple stmt, ba
     {
       FOR_EACH_IMM_USE_FAST (one_use, imm_iter, def)
 	{
-	  if (IS_DEBUG_STMT (USE_STMT (one_use)))
+	  if (is_gimple_debug (USE_STMT (one_use)))
 	    continue;
 
 	  break;
Index: gcc/tree-ssa-ter.c
===================================================================
--- gcc/tree-ssa-ter.c.orig	2008-10-10 09:31:06.000000000 -0300
+++ gcc/tree-ssa-ter.c	2009-06-11 05:24:11.000000000 -0300
@@ -585,7 +585,7 @@ find_replaceable_in_bb (temp_expr_table_
     {
       stmt = gsi_stmt (bsi);
 
-      if (IS_DEBUG_STMT (stmt))
+      if (is_gimple_debug (stmt))
 	continue;
 
       stmt_replaceable = is_replaceable_p (stmt);
Index: gcc/tree-ssa-threadedge.c
===================================================================
--- gcc/tree-ssa-threadedge.c.orig	2009-03-01 04:39:25.000000000 -0300
+++ gcc/tree-ssa-threadedge.c	2009-06-11 05:24:11.000000000 -0300
@@ -282,7 +282,7 @@ record_temporary_equivalences_from_stmts
       /* Ignore empty statements and labels.  */
       if (gimple_code (stmt) == GIMPLE_NOP
 	  || gimple_code (stmt) == GIMPLE_LABEL
-	  || IS_DEBUG_STMT (stmt))
+	  || is_gimple_debug (stmt))
 	continue;
 
       /* If the statement has volatile operands, then we assume we
Index: gcc/tree-ssa-threadupdate.c
===================================================================
--- gcc/tree-ssa-threadupdate.c.orig	2008-10-10 09:31:04.000000000 -0300
+++ gcc/tree-ssa-threadupdate.c	2009-06-11 05:24:11.000000000 -0300
@@ -476,7 +476,7 @@ redirection_block_p (basic_block bb)
   gsi = gsi_start_bb (bb);
   while (!gsi_end_p (gsi)
          && (gimple_code (gsi_stmt (gsi)) == GIMPLE_LABEL
-	     || IS_DEBUG_STMT (gsi_stmt (gsi))
+	     || is_gimple_debug (gsi_stmt (gsi))
              || gimple_nop_p (gsi_stmt (gsi))))
     gsi_next (&gsi);
   
Index: gcc/tree-ssa.c
===================================================================
--- gcc/tree-ssa.c.orig	2009-05-08 05:44:31.000000000 -0300
+++ gcc/tree-ssa.c	2009-06-11 05:24:11.000000000 -0300
@@ -837,7 +837,7 @@ verify_ssa (bool check_modified_stmt)
 		  goto err;
 		}
 	    }
-	  else if (IS_DEBUG_BIND (stmt)
+	  else if (gimple_debug_bind_p (stmt)
 		   && VAR_DEBUG_VALUE_VALUE (stmt) == VAR_DEBUG_VALUE_NOVALUE)
 	    continue;
 
@@ -1587,7 +1587,7 @@ warn_uninitialized_vars (bool warn_possi
 	{
 	  struct walk_stmt_info wi;
 	  data.stmt = gsi_stmt (gsi);
-	  if (IS_DEBUG_STMT (data.stmt))
+	  if (is_gimple_debug (data.stmt))
 	    continue;
 	  memset (&wi, 0, sizeof (wi));
 	  wi.info = &data;
Index: gcc/tree-stdarg.c
===================================================================
--- gcc/tree-stdarg.c.orig	2008-12-10 00:53:47.000000000 -0200
+++ gcc/tree-stdarg.c	2009-06-11 05:24:11.000000000 -0300
@@ -496,7 +496,7 @@ check_all_va_list_escapes (struct stdarg
 	  tree use;
 	  ssa_op_iter iter;
 
-	  if (IS_DEBUG_STMT (stmt))
+	  if (is_gimple_debug (stmt))
 	    continue;
 
 	  FOR_EACH_SSA_TREE_OPERAND (use, stmt, iter, SSA_OP_ALL_USES)
@@ -840,7 +840,7 @@ execute_optimize_stdarg (void)
 		    continue;
 		}
 	    }
-	  else if (IS_DEBUG_STMT (stmt))
+	  else if (is_gimple_debug (stmt))
 	    continue;
 
 	  /* All other uses of va_list are either va_copy (that is not handled
Index: gcc/tree-tailcall.c
===================================================================
--- gcc/tree-tailcall.c.orig	2009-03-01 04:20:44.000000000 -0300
+++ gcc/tree-tailcall.c	2009-06-11 05:24:11.000000000 -0300
@@ -399,7 +399,7 @@ find_tail_calls (basic_block bb, struct 
       stmt = gsi_stmt (gsi);
 
       /* Ignore labels.  */
-      if (gimple_code (stmt) == GIMPLE_LABEL || IS_DEBUG_STMT (stmt))
+      if (gimple_code (stmt) == GIMPLE_LABEL || is_gimple_debug (stmt))
 	continue;
 
       /* Check for a call.  */
@@ -507,7 +507,7 @@ find_tail_calls (basic_block bb, struct 
       if (gimple_code (stmt) == GIMPLE_RETURN)
 	break;
 
-      if (IS_DEBUG_STMT (stmt))
+      if (is_gimple_debug (stmt))
 	continue;
 
       if (gimple_code (stmt) != GIMPLE_ASSIGN)
Index: gcc/tree-vrp.c
===================================================================
--- gcc/tree-vrp.c.orig	2009-05-08 05:42:39.000000000 -0300
+++ gcc/tree-vrp.c	2009-06-11 05:24:11.000000000 -0300
@@ -4676,7 +4676,7 @@ find_assert_locations_1 (basic_block bb,
 
       stmt = gsi_stmt (si);
 
-      if (IS_DEBUG_STMT (stmt))
+      if (is_gimple_debug (stmt))
 	continue;
 
       /* See if we can derive an assertion for any of STMT's operands.  */
Index: gcc/tree-if-conv.c
===================================================================
--- gcc/tree-if-conv.c.orig	2008-08-12 03:55:33.000000000 -0300
+++ gcc/tree-if-conv.c	2009-06-11 05:24:11.000000000 -0300
@@ -241,7 +241,7 @@ tree_if_convert_stmt (struct loop *  loo
 
     case GIMPLE_DEBUG:
       /* ??? Should there be conditional VAR_DEBUG_VALUEs?  */
-      if (IS_DEBUG_BIND (gsi_stmt (*gsi)))
+      if (gimple_debug_bind_p (gsi_stmt (*gsi)))
 	{
 	  VAR_DEBUG_VALUE_VALUE (gsi_stmt (*gsi)) = VAR_DEBUG_VALUE_NOVALUE;
 	  update_stmt (gsi_stmt (*gsi));
Index: gcc/tree-ssa-dce.c
===================================================================
--- gcc/tree-ssa-dce.c.orig	2008-08-12 03:55:33.000000000 -0300
+++ gcc/tree-ssa-dce.c	2009-06-11 05:24:11.000000000 -0300
@@ -736,7 +736,7 @@ eliminate_unnecessary_stmts (void)
 	    }
 	  else
 	    {
-	      if (IS_DEBUG_BIND (stmt))
+	      if (gimple_debug_bind_p (stmt))
 		{
 		  if (something_changed
 		      && (VAR_DEBUG_VALUE_VALUE (stmt)
Index: gcc/tree-ssa-dom.c
===================================================================
--- gcc/tree-ssa-dom.c.orig	2009-03-01 04:28:30.000000000 -0300
+++ gcc/tree-ssa-dom.c	2009-06-11 05:24:11.000000000 -0300
@@ -2644,7 +2644,7 @@ propagate_rhs_into_lhs (gimple stmt, tre
 	      discard_stmt_changes (&use_stmt);
 	      continue;
 	    }
-	  else if (IS_DEBUG_BIND (use_stmt))
+	  else if (gimple_debug_bind_p (use_stmt))
 	    check_and_update_debug_stmt (use_stmt, NULL);
 
 	  /* From this point onward we are propagating into a 
Index: gcc/rtl.h
===================================================================
--- gcc/rtl.h.orig	2009-06-05 03:52:56.000000000 -0300
+++ gcc/rtl.h	2009-06-11 05:24:11.000000000 -0300
@@ -395,7 +395,7 @@ struct rtvec_def GTY(()) {
 #define NONDEBUG_INSN_P(X) (INSN_P (X) && !DEBUG_INSN_P (X))
 
 /* Nonzero if DEBUG_INSN_P may possibly hold.  */
-#define MAY_HAVE_DEBUG_INSNS (flag_var_tracking_assignments)
+#define MAY_HAVE_DEBUG_INSNS MAY_HAVE_DEBUG_STMTS
 
 /* Predicate yielding nonzero iff X is a real insn.  */
 #define INSN_P(X) \
Index: gcc/tree-outof-ssa.c
===================================================================
--- gcc/tree-outof-ssa.c.orig	2008-10-10 09:31:06.000000000 -0300
+++ gcc/tree-outof-ssa.c	2009-06-11 05:28:21.000000000 -0300
@@ -820,7 +820,7 @@ rewrite_trees (var_map map, gimple *valu
 	    gsi_remove (&gsi, true);
 	  else
 	    {
-	      if (IS_DEBUG_STMT (stmt))
+	      if (is_gimple_debug (stmt))
 		check_and_update_debug_stmt (stmt, not_ssa_name_p);
 	      if (changed)
 		if (maybe_clean_or_replace_eh_stmt (stmt, stmt))
@@ -1142,7 +1142,7 @@ analyze_edges_for_bb (basic_block bb)
 		  /* Punt if it has non-label stmts, or isn't local.  */
 		  if (((!is_label
 			|| DECL_NONLOCAL (gimple_label_label (stmt)))
-		       && !IS_DEBUG_STMT (stmt))
+		       && !is_gimple_debug (stmt))
 		      || !gsi_end_p (gsi))
 		    {
 		      gsi_commit_one_edge_insert (e, NULL);
Index: gcc/tree-ssa-alias.c
===================================================================
--- gcc/tree-ssa-alias.c.orig	2009-03-01 04:30:46.000000000 -0300
+++ gcc/tree-ssa-alias.c	2009-06-11 05:28:21.000000000 -0300
@@ -2723,7 +2723,7 @@ update_alias_info (struct alias_info *ai
 
       for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
 	{
-	  if (IS_DEBUG_STMT (gsi_stmt (gsi)))
+	  if (is_gimple_debug (gsi_stmt (gsi)))
 	    continue;
 	  update_alias_info_1 (gsi_stmt (gsi), ai);
 	}
Index: gcc/tree-vectorizer.c
===================================================================
--- gcc/tree-vectorizer.c.orig	2009-05-08 05:44:11.000000000 -0300
+++ gcc/tree-vectorizer.c	2009-06-11 05:28:21.000000000 -0300
@@ -2538,7 +2538,7 @@ vect_is_simple_reduction (loop_vec_info 
   FOR_EACH_IMM_USE_FAST (use_p, imm_iter, name)
     {
       gimple use_stmt = USE_STMT (use_p);
-      if (IS_DEBUG_STMT (use_stmt))
+      if (is_gimple_debug (use_stmt))
 	continue;
       if (flow_bb_inside_loop_p (loop, gimple_bb (use_stmt))
 	  && vinfo_for_stmt (use_stmt)
@@ -2582,7 +2582,7 @@ vect_is_simple_reduction (loop_vec_info 
   FOR_EACH_IMM_USE_FAST (use_p, imm_iter, name)
     {
       gimple use_stmt = USE_STMT (use_p);
-      if (IS_DEBUG_STMT (use_stmt))
+      if (is_gimple_debug (use_stmt))
 	continue;
       if (flow_bb_inside_loop_p (loop, gimple_bb (use_stmt))
 	  && vinfo_for_stmt (use_stmt)
-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer

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