cmd/compile: duplicate blocks calling runtime.panicXXX in some procedures #24478
Labels
FrozenDueToAge
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?tip
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?Tried ppc64le and x86
What did you do?
While looking at some objdumps I noticed some functions that had several blocks of code at the end of the procedure with calls to runtime.panicXXX functions. In some cases there were many duplicate blocks calling the same function.
What did you expect to see?
The blocks containing identical calls could be collapsed into a single block, with all predecessors branching to the same block.
What did you see instead?
Here is an example on ppc64le from function runtime.selectgo. Similar code appears in the x86 objdump.
Fixing this would reduce the size of the function, possibly enabling more inlining, and reduce the size of the binary.
The text was updated successfully, but these errors were encountered: