LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 30337 - Don't emit Win64 pdata/xdata for "leaf" functions
Summary: Don't emit Win64 pdata/xdata for "leaf" functions
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: Backend: X86 (show other bugs)
Version: trunk
Hardware: PC Windows NT
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks: 26299
  Show dependency tree
 
Reported: 2016-09-09 11:07 PDT by Hans Wennborg
Modified: 2016-09-23 18:33 PDT (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hans Wennborg 2016-09-09 11:07:18 PDT
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.
Comment 1 Hans Wennborg 2016-09-23 18:33:18 PDT
r282185