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] Update TREE_USED bit on blocks


Hi,

in the patch at http://gcc.gnu.org/ml/gcc-patches/2009-02/msg01025.html, Jan 
surreptitiously removed a test on TREE_USED from dbxout.c without realizing 
that the idiom is present in other debug back-ends as well.  I think that a 
better approach is to update TREE_USED instead.

Tested (GCC, GDB) on i586-suse-linux, OK for mainline?


2009-04-17  Eric Botcazou  <ebotcazou@adacore.com>

	* dbxout.c (dbxout_block): Reinstate test on TREE_USED.
	* tree-ssa-live.c (remove_unused_scope_block_p): Update TREE_USED bit.


-- 
Eric Botcazou
Index: dbxout.c
===================================================================
--- dbxout.c	(revision 146259)
+++ dbxout.c	(working copy)
@@ -3594,7 +3594,7 @@ dbxout_block (tree block, int depth, tre
   while (block)
     {
       /* Ignore blocks never expanded or otherwise marked as real.  */
-      if (TREE_ASM_WRITTEN (block))
+      if (TREE_USED (block) && TREE_ASM_WRITTEN (block))
 	{
 	  int did_output;
 	  int blocknum = BLOCK_NUMBER (block);
Index: tree-ssa-live.c
===================================================================
--- tree-ssa-live.c	(revision 146259)
+++ tree-ssa-live.c	(working copy)
@@ -595,6 +595,8 @@ remove_unused_scope_block_p (tree scope)
    /* Verfify that only blocks with source location set
       are entry points to the inlined functions.  */
      gcc_assert (BLOCK_SOURCE_LOCATION (scope) == UNKNOWN_LOCATION);
+
+   TREE_USED (scope) = !unused;
    return unused;
 }
 

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