This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


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

Re: remove_unnecessary_notes breaks libjava build


kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:

> But the point is that BLOCK_DEAD is being set *precisely* in the
> case where the note is being deleted.  So how can somebody be using it?

Ah, but the insn notes for the *sub*-blocks are not deleted, yet
all_blocks does not recursive if BLOCK_DEAD is set.  This patch
seems to fix that problem.  (The boostrap hasn't completed yet.)

Does this look right?

Index: function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.254
diff -u -p -r1.254 function.c
--- function.c	2001/03/02 01:50:49	1.254
+++ function.c	2001/03/07 06:22:49
@@ -5954,20 +5954,22 @@ all_blocks (blocks, vector)
   tree block;
 
   for (block = blocks; block != 0; block = TREE_CHAIN (block))
-    if (!BLOCK_DEAD (block))
-      {
-	TREE_ASM_WRITTEN (block) = 0;
+    {
+      if (! BLOCK_DEAD (block))
+	{
+	  TREE_ASM_WRITTEN (block) = 0;
 
-	/* Record this block.  */
-	if (vector)
-	  vector[n_blocks] = block;
+	  /* Record this block.  */
+	  if (vector)
+	    vector[n_blocks] = block;
 
-	++n_blocks;
+	  ++n_blocks;
+	}
 
-	/* Record the subblocks, and their subblocks...  */
-	n_blocks += all_blocks (BLOCK_SUBBLOCKS (block),
-				vector ? vector + n_blocks : 0);
-      }
+      /* Record the subblocks, and their subblocks...  */
+      n_blocks += all_blocks (BLOCK_SUBBLOCKS (block),
+			      vector ? vector + n_blocks : 0);
+    }
 
   return n_blocks;
 }

-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/


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