This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
patch for mainline and tree-profiling line to fix cgraph bits.
- From: Kenneth Zadeck <zadeck at naturalbridge dot com>
- To: gcc-patches at gcc dot gnu dot org, Jan Hubicka <jh at suse dot cz>,Steven Bosscher <stevenb at suse dot de>,Mark Mitchell <mark at codesourcery dot com>,"Zadeck, Kenneth" <zadeck at naturalbridge dot com>
- Date: Sat, 30 Oct 2004 09:54:48 -0400
- Subject: patch for mainline and tree-profiling line to fix cgraph bits.
there are two patches in this mail, one for the mainline and one for the
tree-profiling branch. Both correct the same problems.
They remove one dead flag from the cgraph.local structure and they add
missing bits to the dump_cgraph_node function. The patches differ
because the sets of bits missing from in the cgraph_node print routine
differ between the two lines.
Both have been tested on i686 and they were requested by Jan.
2004-10-30 Kenneth Zadeck <zadeck@naturalbridge.com>
* cgraph.h: Removed for_functions_valid bit.
* cgraph.c:dump_cgraph_node: added missing bits to dump function.
Kenny
Index: bitmap.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/bitmap.h,v
retrieving revision 1.38
diff -c -3 -p -r1.38 bitmap.h
*** bitmap.h 15 Oct 2004 14:47:05 -0000 1.38
--- bitmap.h 29 Oct 2004 11:58:57 -0000
*************** bmp_iter_and_next (bitmap_iterator *bi)
*** 576,582 ****
/* Loop over all bits in BMP1 and BMP2, starting with MIN, setting
BITNUM to the bit number for all bits that are set in both bitmaps.
! ITER is a bitmap iterator. */
#define EXECUTE_IF_AND_IN_BITMAP(BMP1, BMP2, MIN, BITNUM, ITER) \
for ((BITNUM) = bmp_iter_and_init (&(ITER), (BMP1), (BMP2), (MIN)); \
--- 576,586 ----
/* Loop over all bits in BMP1 and BMP2, starting with MIN, setting
BITNUM to the bit number for all bits that are set in both bitmaps.
! ITER is a bitmap iterator.
!
! DO NOT DELETE BITS FROM THE BITMAP WHILE ITERATING THROUGH IT!!
! The iterator is not defined when the underlying bitmap is
! changed in this way. */
#define EXECUTE_IF_AND_IN_BITMAP(BMP1, BMP2, MIN, BITNUM, ITER) \
for ((BITNUM) = bmp_iter_and_init (&(ITER), (BMP1), (BMP2), (MIN)); \
Index: cgraph.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cgraph.c,v
retrieving revision 1.59
diff -c -3 -p -r1.59 cgraph.c
*** cgraph.c 25 Oct 2004 22:04:00 -0000 1.59
--- cgraph.c 29 Oct 2004 11:59:23 -0000
*************** dump_cgraph_node (FILE *f, struct cgraph
*** 473,482 ****
--- 473,486 ----
fprintf (f, " output");
if (node->local.local)
fprintf (f, " local");
+ if (node->local.finalized)
+ fprintf (f, " finalized");
if (node->local.disregard_inline_limits)
fprintf (f, " always_inline");
else if (node->local.inlinable)
fprintf (f, " inlinable");
+ if (node->local.redefined_extern_inline)
+ fprintf (f, " redefined_extern_inline");
if (TREE_ASM_WRITTEN (node->decl))
fprintf (f, " asm_written");
Index: cgraph.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cgraph.h,v
retrieving revision 1.39
diff -c -3 -p -r1.39 cgraph.h
*** cgraph.h 25 Oct 2004 22:04:00 -0000 1.39
--- cgraph.h 29 Oct 2004 11:59:23 -0000
*************** struct cgraph_local_info GTY(())
*** 47,56 ****
/* True when the function has been originally extern inline, but it is
redefined now. */
bool redefined_extern_inline;
-
- /* True if statics_read_for_function and
- statics_written_for_function contain valid data. */
- bool for_functions_valid;
};
/* Information about the function that needs to be computed globally
--- 47,52 ----
Index: cgraph.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cgraph.c,v
retrieving revision 1.4.4.18.2.12
diff -c -3 -p -r1.4.4.18.2.12 cgraph.c
*** cgraph.c 26 Oct 2004 14:06:51 -0000 1.4.4.18.2.12
--- cgraph.c 29 Oct 2004 15:53:37 -0000
*************** dump_cgraph_node (FILE *f, struct cgraph
*** 477,486 ****
--- 477,492 ----
fprintf (f, " output");
if (node->local.local)
fprintf (f, " local");
+ if (node->local.externally_visible)
+ fprintf (f, " externally_visible");
+ if (node->local.finalized)
+ fprintf (f, " finalized");
if (node->local.disregard_inline_limits)
fprintf (f, " always_inline");
else if (node->local.inlinable)
fprintf (f, " inlinable");
+ if (node->local.redefined_extern_inline)
+ fprintf (f, " redefined_extern_inline");
if (TREE_ASM_WRITTEN (node->decl))
fprintf (f, " asm_written");
Index: cgraph.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cgraph.h,v
retrieving revision 1.1.4.16.2.10
diff -c -3 -p -r1.1.4.16.2.10 cgraph.h
*** cgraph.h 26 Oct 2004 14:06:51 -0000 1.1.4.16.2.10
--- cgraph.h 29 Oct 2004 15:53:37 -0000
*************** struct cgraph_local_info GTY(())
*** 50,59 ****
/* True when the function has been originally extern inline, but it is
redefined now. */
bool redefined_extern_inline;
-
- /* True if statics_read_for_function and
- statics_written_for_function contain valid data. */
- bool for_functions_valid;
};
/* Information about the function that needs to be computed globally
--- 50,55 ----