This is the mail archive of the 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]

Re: Put scope blocks on a diet

On Oct  3, 2007, Alexandre Oliva <> wrote:

> However, it breaks the vta branch, because we still keep debug
> annotations for variables in blocks that your patch removes.  I
> suppose I could just drop such annotations in the floor for now, but,
> in the long run, should I?

Rather than dropping the annotations, I can simply drop the block
information from them, as in the following patch, that I've just
installed in the vta branch, along with your patch.

for gcc/ChangeLog.vta
from  Alexandre Oliva  <>

	* tree-ssa-live.c (copy_body_r): Cope with references to
	removed blocks in debug stmts.

Index: gcc/tree-inline.c
--- gcc/tree-inline.c.orig	2007-10-09 03:31:45.000000000 -0300
+++ gcc/tree-inline.c	2007-10-09 17:39:25.000000000 -0300
@@ -731,8 +731,12 @@ copy_body_r (tree *tp, int *walk_subtree
 	      tree *n;
 	      n = (tree *) pointer_map_contains (id->decl_map,
 						 TREE_BLOCK (*tp));
-	      gcc_assert (n);
-	      new_block = *n;
+	      if (n)
+		new_block = *n;
+	      else if (IS_DEBUG_STMT (*tp) || processing_debug_stmt_p)
+		new_block = NULL;
+	      else
+		gcc_unreachable ();
 	  TREE_BLOCK (*tp) = new_block;
Alexandre Oliva
FSF Latin America Board Member
Red Hat Compiler Engineer   aoliva@{,}
Free Software Evangelist  oliva@{,}

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