-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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: apparently extraneous inlmarks #31618
Comments
(code from discussion at #31586) |
This is basically a dup of #29571. The two marks are to remember the positions of the two callsites. I'm surprised we don't remove the first nop. There's another instruction with the same line number - we should have used that instruction instead for the mark, as of CL 158021. We could put these nops at the end of the function, so they never get executed. I put them inline because it might help debuggers set a breakpoint on that source line. But that's just from my intuition - I'm not sure if that's in fact the case, or if there is another way (DWARF, I guess) to enable that. |
Looks like CL 169739 is the one that broke CL 158021. The line numbers don't match because one is a statement and one isn't. @dr2chase : What's the right way to do Would |
Change https://golang.org/cl/173324 mentions this issue: |
I think that's a good CL, and the reasoning for make it be a statement is sound. |
generates:
Note the side-by-side NOPs at 0x000e and 0x000f. (They do have different line numbers.) They are also at the beginning of the routine, before any other work has been done.
This makes me wonder whether we could eliminate either or both. @randall77 anything we can do here?
The text was updated successfully, but these errors were encountered: