When optimizing code, or trying to track down some crash bugs, it can be helpful to inspect the assembly code that the compiler generates for a particular function. Gopls should add a "Source action..." (CodeAction) named "Show $GOARCH assembly for function f...", where $GOARCH is the current view's GOARCH, and f is the name of the function enclosing the selection. This would cause the LSP client to visit a web page containing the output of go build -gcflags=-S for that package, with the page scrolled to put the current function in view.

Bonus marks if each /blah/blah/foo.go:123 reference is replaced by a discreet link that navigates the client editor to that source location.

Even more bonus marks if assembly is post-processed so that block labels and control jumps are all connected up, in the style of @aclements' https://github.com/aclements/objbrowse.

Comment From: gopherbot

Change https://go.dev/cl/588395 mentions this issue: gopls/internal/golang: add "Show assembly of f" code action