This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Do not pad NOTEs
- From: Dan Nicolaescu <dann at ics dot uci dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 08 Jul 2003 14:27:12 -0700
- Subject: [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.