MD-only RTL out of compiler (2/2) substantive change
Tue Aug 24 17:24:00 GMT 2004
This patch causes all RTX codes that are only used in machine
descriptions to be excluded from rtl.def when building the compiler
proper. As previously discussed, this is good for a 6-10KB reduction
in the size of the compiler binaries.
There's not much to the change - all I had to do was add an #ifdef
GENERATOR_FILE around the appropriate section of rtl.def. The only
fallout was in gengtype.c, which needed to examine rtl.def and
insn-notes.def directly rather than rely on rtl.def. A nice side
effect is that the generated gtype-desc.c now uses the enumeration
constants to refer to insn note code numbers, not integer literals.
* rtl.def: Wrap MD-only codes in #ifdef GENERATOR_FILE.
* gengtype.c: Don't include rtl.h. Define enum rtx_code and
rtx_name, rtx_format arrays by direct reference to rtl.def,
first undefining GENERATOR_FILE. Define enum insn_note and
note_insn_name array by direct reference to insn-notes.def.
(adjust_field_rtx_def): Remove local definition of rtx_name.
Use symbolic names for insn notes.
* Makefile.in (gengtype.o): Update dependencies.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 4318 bytes
Desc: not available
More information about the Gcc-patches