New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
omit frame for leaf functions on Linux, FreeBSD and OSX #5040
Conversation
d1bce99
to
81ceda2
Compare
81ceda2
to
9fe1641
Compare
Ready to rock. |
This is an important optimization. Pls pull. |
ping @yebblies @MartinNowak |
Why isn't this being pulled? I want to do more optimizations. |
Looks like FreeBSD is randomly failing. Why can't we have a test suite that runs reliably? |
Because you're the only one that understands this code. |
All it is is not generating a BP stack frame if the function does not throw Exceptions or Errors. |
/* Look for __va_argsave | ||
*/ | ||
for (SYMIDX si = 0; si < globsym.top; si++) | ||
{ symbol *s = globsym.tab[si]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code after {
is bleh
Auto-merge toggled on |
omit frame for leaf functions on Linux, FreeBSD and OSX
omit frame for leaf functions on Linux, FreeBSD and OSX
Question, |
yes |
* upstream/dmd-1.x: (37 commits) Add ddoc support for 'Template Params' section sync up with D2's backend fold in D2 changes fix build break Merge pull request dlang#5100 from WalterBright/movParams refactor: use LocalSection for alloca data Merge pull request dlang#5076 from WalterBright/AllocOff Merge pull request dlang#5064 from WalterBright/frame Merge pull request dlang#5070 from WalterBright/params Merge pull request dlang#5069 from WalterBright/go4 Merge pull request dlang#5067 from WalterBright/go3 Merge pull request dlang#5066 from WalterBright/go2 Merge pull request dlang#5065 from WalterBright/go Merge pull request dlang#5060 from WalterBright/floatalign Merge pull request dlang#5059 from WalterBright/cstop Merge pull request dlang#5040 from WalterBright/noframe Merge pull request dlang#5051 from WalterBright/movsx Merge pull request dlang#5024 from WalterBright/fakeeh Merge pull request dlang#4978 from WalterBright/rmVBTABLES Merge pull request dlang#4976 from WalterBright/backendgetRtlsym ...
Omitting the setup and teardown of the BP stack frame can speed up small functions.
Currently, this is done only for Win32. Unfortunately for other platforms, the exception unwinding system relies on there being a BP stack frame. So it is only possible to do this for 'leaf' functions which do not throw (not even throwing
Error
s).Only doing this for Linux at the moment, will extend if successful.