This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Coalesce object-code identical dtor, template, etc. ?
- From: "Karl M. Hegbloom" <hegbloom at pdx dot edu>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 03 Jun 2003 11:48:55 -0700
- Subject: Coalesce object-code identical dtor, template, etc. ?
- Organization:
When I use a template instantiated with a pointer to type, or when more
than one automaticly generated function is created... The object code I
see when I compile it with "-S" often has several functions in it that
are _identical_, instruction for instruction, other than their jump
label, which only "really" exists in the compiler/assembler, not at
runtime. I think that a good optimization would be to detect that, and
just write two labels and one function. This will reduce the object
binary size, perhaps considerably. Also, can the linker do this as
well?
Q: Are there pre-compiled STL data types instantiated with
pointer-to-type that could be reused in the above fashion?
--
Karl M. Hegbloom <hegbloom@pdx.edu>