[PATCH] C++ space optimization: de-cloning con/de/structors
Stuart Hastings
stuart@apple.com
Tue Aug 6 16:56:00 GMT 2002
On Tuesday, Aug 6, 2002, at 16:02 US/Pacific, Richard Henderson wrote:
> On Tue, Aug 06, 2002 at 11:41:49AM -0700, Stuart Hastings wrote:
>> There is a related patch coming soon that recognizes these thunk-esque
>> clones and omits the EH info for them, saving more space.
>
> You realize this can only happen when you know for
> absolute certain that these thunks actually do get
> generated with tail-calls, right? The target can
> reject the tail-call with FUNCTION_OK_FOR_SIBCALL.
I got this wrong, twice. Ask me how I know. :-P
However, it was clearly worth the effort; with the de-cloner operating,
this shaved another 10% off the diskfile size of a certain, critical OS
X framework. Combined, the de-cloner and the EH-info change shaved
15-16% off the projects we measured. This didn't get us back to the
sizes we got with GCC2, but our management was nonetheless pleased.
>> + /* If constructor expects vector (e.g. AltiVec) arguments, give
>> up. */
>
> Why?
Laziness; if I support it, I'm obligated to test it, and AltiVec C++
codes are rare and not trivial to debug.
It's likely that the de-cloner would work fine with C++ constructors
that take AltiVec parameters (or their x86 counterparts), and I believe
this restriction could be relaxed.
stuart hastings
Apple Computer
More information about the Gcc-patches
mailing list