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] Do not pad NOTEs


NOTEs have 8 bytes of padding on 32bit machines. 
Given that C++ compilations or compiling with debug information
produce a high number of NOTEs, the padding overhead becomes
important.

The patch below gives about 1% improvement in compilation speed for
the testcase in PR8361 when using -O2 -g.

If the patch is OK, please apply it. I don't have write permissions. 

2003-07-08  Dan Nicolaescu  <dann@ics.uci.edu>

	* rtl.def (NOTE): Do not use padding.


Index: rtl.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtl.def,v
retrieving revision 1.71
diff -c -3 -p -c -r1.71 rtl.def
*** rtl.def	5 Jul 2003 15:17:34 -0000	1.71
--- rtl.def	8 Jul 2003 21:24:10 -0000
*************** DEF_RTL_EXPR(CODE_LABEL, "code_label", "
*** 631,640 ****
     Operand:
     5: filename, if line number > 0, note-specific data otherwise.
     6: line number if > 0, enum note_insn otherwise.
!    7: unique number if line number == note_insn_deleted_label.
!    8-9: padding so that notes and insns are the same size, and thus
!          allocated from the same page ordering.  */
! DEF_RTL_EXPR(NOTE, "note", "iuuB0ni00", 'x')
  
  /* ----------------------------------------------------------------------
     Top level constituents of INSN, JUMP_INSN and CALL_INSN.
--- 631,638 ----
     Operand:
     5: filename, if line number > 0, note-specific data otherwise.
     6: line number if > 0, enum note_insn otherwise.
!    7: unique number if line number == note_insn_deleted_label.  */
! DEF_RTL_EXPR(NOTE, "note", "iuuB0ni", 'x')
  
  /* ----------------------------------------------------------------------
     Top level constituents of INSN, JUMP_INSN and CALL_INSN.


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