-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: degraded pcln quality on 1.18 #47880
Comments
For reference, input source code is, function in question is
The change is in the AST input to the back-end (look at the second-to-the-last line):
versus the earlier
@mdempsky does anything here leap out at you? To me it looks like the CONV picked up the pos of its input's declaration, instead of its location in the source code. |
Does the issue still reproduce with GOEXPERIMENT=unified? -G=3 calculates position information differently than -G=0 did; but unified IR should more closely match the position information generated by -G=0. |
Also happens with GOEXPERIMENT=unified. |
Oh, it looks like it happens with -G=0 too. Seems like a change in walk then. Bisecting. |
Bisect identified 57668b8. /cc @randall77 @danscales |
Change https://golang.org/cl/345095 mentions this issue: |
Change https://golang.org/cl/348970 mentions this issue: |
Extend the existing dump-to-file to also do assembly output to make it easier to write debug-information tests that check for line-numbering in particular orders. Includes POC test (which is silent w/o -v): go test -v -run TestDebugLines cmd/compile/internal/ssa === RUN TestDebugLines Preserving temporary directory /var/folders/v6/xyzzy/T/debug_lines_test321 About to run (cd /var/folders/v6/xyzzy/T/debug_lines_test321; \ GOSSADIR=/var/folders/v6/xyzzy/T/debug_lines_test321 \ /Users/drchase/work/go/bin/go build -o foo.o \ '-gcflags=-N -l -d=ssa/genssa/dump=sayhi' \ /Users/drchase/work/go/src/cmd/compile/internal/ssa/testdata/sayhi.go ) Saw stmt# 8 for submatch '8' on dump line #7 = ' v107 00005 (+8) MOVQ AX, "".n(SP)' Saw stmt# 9 for submatch '9' on dump line #9 = ' v87 00007 (+9) MOVUPS X15, ""..autotmp_2-32(SP)' Saw stmt# 10 for submatch '10' on dump line #46 = ' v65 00044 (+10) MOVUPS X15, ""..autotmp_2-32(SP)' Saw stmt# 11 for submatch '11' on dump line #83 = ' v131 00081 (+11) MOVQ "".wg+8(SP), AX' --- PASS: TestDebugLines (4.95s) PASS ok cmd/compile/internal/ssa 5.685s Includes a test to ensure that inlining information is printed correctly. Updates #47880. Change-Id: I83b596476a88687d71d5b65dbb94641a576d747e Reviewed-on: https://go-review.googlesource.com/c/go/+/348970 Trust: David Chase <drchase@google.com> Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Change https://golang.org/cl/351229 mentions this issue: |
Compile https://github.com/go-delve/delve/blob/master/_fixtures/parallel_next.go with
-gcflags='all=-N -l'
, the instructionMOVQ 0x98(SP), AX
at 0x493f0c and 0x493faf is assigned to line :8 (the header of main.sayhi) and has the stmt flag set, causing delve to move back and forth from the body of the function to the header.On 1.17 the same instruction is generated but it is assigned to the surrounding line of code and does not have the stmt flag set.
cc @dr2chase
The text was updated successfully, but these errors were encountered: