Skip to content
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

Don't emit Win64 pdata/xdata for "leaf" functions #29685

Closed
zmodem opened this issue Sep 9, 2016 · 1 comment
Closed

Don't emit Win64 pdata/xdata for "leaf" functions #29685

zmodem opened this issue Sep 9, 2016 · 1 comment
Labels
backend:X86 bugzilla Issues migrated from bugzilla

Comments

@zmodem
Copy link
Collaborator

zmodem commented Sep 9, 2016

Bugzilla Link 30337
Resolution FIXED
Resolved on Sep 23, 2016 18:33
Version trunk
OS Windows NT
Blocks #26673

Extended Description

From https://msdn.microsoft.com/en-us/library/ms235286.aspx:

"Leaf functions are functions that do not change any non-volatile registers. .. Leaf functions can be unwound simply by simulating a return, so pdata and xdata are not required."

Not emitting these would be good for binary size.

Note that such functions can still tail-call others, so they're not really leafs in the call-graph sense.

If we hook up a way to determine whether a function is a leaf in this sense, we can also use it to do conditional tail-calls for Win64. Such calls would generally confuse the unwinder, but in leaf functions they are fine.

@zmodem
Copy link
Collaborator Author

zmodem commented Sep 24, 2016

r282185

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:X86 bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

1 participant