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/link,runtime: unused fields in inlinedCall #54849

Closed
prattmic opened this issue Sep 2, 2022 · 2 comments
Closed

cmd/link,runtime: unused fields in inlinedCall #54849

prattmic opened this issue Sep 2, 2022 · 2 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@prattmic
Copy link
Member

prattmic commented Sep 2, 2022

runtime.inlinedCall fields parent (parentPc is used instead), file (pcfile in the parent is used), and line (pcln in the parent is used) seem to be completely unused. They are a reflection of fields in goobj.InlTreeNode, which are used within the toolchain, but the runtime itself doesn't need them.

If I did the math right, cmd/go contains 431KB of inlineTree objects (2.8% of the binary size). With those fields gone it would drop to 258KB.

@prattmic prattmic added this to the Backlog milestone Sep 2, 2022
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Sep 2, 2022
@aclements
Copy link
Member

aclements commented Sep 2, 2022

Neat. Originally these were important because we didn't have parentPc or the marker NOPs to attach file/line to, so the only source of that metadata was the inline tree. I believe you're right that they are no longer necessary.

@gopherbot
Copy link

gopherbot commented Sep 2, 2022

Change https://go.dev/cl/427960 mentions this issue: cmd/link,runtime: remove unused fields from inlinedCall

@seankhliao seankhliao added the NeedsFix The path to resolution is known, but the work has not been done. label Sep 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done.
Projects
Status: Done
Development

No branches or pull requests

4 participants