This is the mail archive of the gcc-bugs@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]

Coalesce object-code identical dtor, template, etc. ?


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>


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