r230255 - Only lower __builtin_setjmp / __builtin_longjmp to
Joerg Sonnenberger
joerg at britannica.bec.de
Tue Mar 3 10:29:12 PST 2015
On Tue, Mar 03, 2015 at 11:59:53AM -0600, Hal Finkel wrote:
> Having implemented this, I assure you that the potential is not small.
> Eliminating the unnecessary spilling, the overhead of the function call,
> and better scheduling of the spills/restores, I've seen 10x speedups
> (even on modern OOO cores). Please also remember that small functions
> often don't use all available registers, especially vector registers
> (which tend to be expensive to save and restore), and so you can just
> ignore the caller-saved register entirely (you don't need to save them
> in the prologue or in setjmp call if you don't use them -- it is a pure
> savings).
Huh? How do you know that the intermediate functions haven't clobbered a
register? Without unwinding, which we explicitly do not want to do here,
you can't. As such you *can't* avoid the spilling.
Joerg
More information about the cfe-commits
mailing list