Kill REG_EXEC_COUNT note

Josef Zlomek zlomj9am@artax.karlin.mff.cuni.cz
Wed Feb 19 10:24:00 GMT 2003


Hi,

this patch kills REG_EXEC_COUNT which is not used since GCC 3.1.

Bootstrapped/regtested x86-64.

OK for mainline and 3.3 branch?
(and maybe for 3.2 branch but I'm not sure we want to change
documentation between 3.2.2 and 3.2.3 because of this patch)

Josef

2003-02-19  Josef Zlomek  <zlomekj@suse.cz>

	* combine.c (distribute_notes): Kill REG_EXEC_COUNT.
	* rtl.c (reg_note_name): Likewise.
	* rtl.h (enum reg_note): Likewise.
	* doc/invoke.texi: Likewise.
	* doc/rtl.texi: Likewise.

Index: gcc/combine.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/combine.c,v
retrieving revision 1.340
diff -c -3 -p -r1.340 combine.c
*** gcc/combine.c	14 Feb 2003 07:35:44 -0000	1.340
--- gcc/combine.c	18 Feb 2003 14:46:12 -0000
*************** distribute_notes (notes, from_insn, i3, 
*** 12583,12589 ****
  	{
  	case REG_BR_PROB:
  	case REG_BR_PRED:
- 	case REG_EXEC_COUNT:
  	  /* Doesn't matter much where we put this, as long as it's somewhere.
  	     It is preferable to keep these notes on branches, which is most
  	     likely to be i3.  */
--- 12583,12588 ----
Index: gcc/rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtl.c,v
retrieving revision 1.122
diff -c -3 -p -r1.122 rtl.c
*** gcc/rtl.c	26 Jan 2003 09:02:55 -0000	1.122
--- gcc/rtl.c	18 Feb 2003 14:46:12 -0000
*************** const char * const reg_note_name[] =
*** 228,234 ****
    "REG_WAS_0", "REG_RETVAL", "REG_LIBCALL", "REG_NONNEG",
    "REG_NO_CONFLICT", "REG_UNUSED", "REG_CC_SETTER", "REG_CC_USER",
    "REG_LABEL", "REG_DEP_ANTI", "REG_DEP_OUTPUT", "REG_BR_PROB",
!   "REG_EXEC_COUNT", "REG_NOALIAS", "REG_SAVE_AREA", "REG_BR_PRED",
    "REG_FRAME_RELATED_EXPR", "REG_EH_CONTEXT", "REG_EH_REGION",
    "REG_SAVE_NOTE", "REG_MAYBE_DEAD", "REG_NORETURN",
    "REG_NON_LOCAL_GOTO", "REG_SETJMP", "REG_ALWAYS_RETURN",
--- 228,234 ----
    "REG_WAS_0", "REG_RETVAL", "REG_LIBCALL", "REG_NONNEG",
    "REG_NO_CONFLICT", "REG_UNUSED", "REG_CC_SETTER", "REG_CC_USER",
    "REG_LABEL", "REG_DEP_ANTI", "REG_DEP_OUTPUT", "REG_BR_PROB",
!   "REG_NOALIAS", "REG_SAVE_AREA", "REG_BR_PRED",
    "REG_FRAME_RELATED_EXPR", "REG_EH_CONTEXT", "REG_EH_REGION",
    "REG_SAVE_NOTE", "REG_MAYBE_DEAD", "REG_NORETURN",
    "REG_NON_LOCAL_GOTO", "REG_SETJMP", "REG_ALWAYS_RETURN",
Index: gcc/rtl.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtl.h,v
retrieving revision 1.383
diff -c -3 -p -r1.383 rtl.h
*** gcc/rtl.h	5 Feb 2003 00:56:40 -0000	1.383
--- gcc/rtl.h	18 Feb 2003 14:46:13 -0000
*************** enum reg_note
*** 688,698 ****
       return.  */
    REG_BR_PROB,
  
-   /* REG_EXEC_COUNT is attached to the first insn of each basic block, and
-      the first insn after each CALL_INSN.  It indicates how many times this
-      block was executed.  */
-   REG_EXEC_COUNT,
- 
    /* Attached to a call insn; indicates that the call is malloc-like and
       that the pointer returned cannot alias anything else.  */
    REG_NOALIAS,
--- 688,693 ----
Index: gcc/doc/invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.242
diff -c -3 -p -r1.242 invoke.texi
*** gcc/doc/invoke.texi	16 Feb 2003 01:11:41 -0000	1.242
--- gcc/doc/invoke.texi	18 Feb 2003 14:46:13 -0000
*************** file  The information in this data file 
*** 4241,4248 ****
  structure of the generated code, so you must use the same source code
  and the same optimization options for both compilations.
  
! With @option{-fbranch-probabilities}, GCC puts a @samp{REG_EXEC_COUNT}
! note on the first instruction of each basic block, and a
  @samp{REG_BR_PROB} note on each @samp{JUMP_INSN} and @samp{CALL_INSN}.
  These can be used to improve optimization.  Currently, they are only
  used in one place: in @file{reorg.c}, instead of guessing which path a
--- 4241,4247 ----
  structure of the generated code, so you must use the same source code
  and the same optimization options for both compilations.
  
! With @option{-fbranch-probabilities}, GCC puts a 
  @samp{REG_BR_PROB} note on each @samp{JUMP_INSN} and @samp{CALL_INSN}.
  These can be used to improve optimization.  Currently, they are only
  used in one place: in @file{reorg.c}, instead of guessing which path a
Index: gcc/doc/rtl.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/rtl.texi,v
retrieving revision 1.48
diff -c -3 -p -r1.48 rtl.texi
*** gcc/doc/rtl.texi	5 Feb 2003 22:37:54 -0000	1.48
--- gcc/doc/rtl.texi	18 Feb 2003 14:46:13 -0000
*************** are stored in the @code{REG_NOTES} field
*** 3283,3294 ****
  @code{expr_list}.
  
  @table @code
- @findex REG_EXEC_COUNT
- @item REG_EXEC_COUNT
- This is used to indicate the number of times a basic block was executed
- according to the profile data.  The note is attached to the first insn in
- the basic block.
- 
  @findex REG_BR_PROB
  @item REG_BR_PROB
  This is used to specify the ratio of branches to non-branches of a
--- 3283,3288 ----



More information about the Gcc-patches mailing list