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

cmd/compile: allow inlining of open-coded defer calls #38471

Open
prattmic opened this issue Apr 15, 2020 · 0 comments
Open

cmd/compile: allow inlining of open-coded defer calls #38471

prattmic opened this issue Apr 15, 2020 · 0 comments

Comments

@prattmic
Copy link
Member

@prattmic prattmic commented Apr 15, 2020

Inlining happens before SSA conversion, while open-coded defers happen after, thus the open-coded deferred call can never be inlined. It would be nice to fix this.

@danscales:

It definitely is not trivial, since inlining happens before SSA conversion, whereas there are a bunch of reasons why at least some of the open-coded defer work have to be done during SSA conversion. Among other things, we need to force storing defer args to stack slots and keeping those stacks slots live even though they sometimes appear to be dead (but are actually needed to run the open-coded defers when there is a panic).

@randall77 @aclements

@prattmic prattmic added this to the Unplanned milestone Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.