Commit 82af9e67 authored by David Chase's avatar David Chase
Browse files

cmd/compile: move statement marks from jumps to targets

When a jump at the end of a block is about to be marked as
a statement, if the first real instruction in the target
block is also a statement for the same line, remove the
mark from the jump.

This is a first effort at a minimal-harm heuristic.
A better heuristic might skip over any "not-statement"
values preceding a definitely marked value.

Fixes #29443.

Change-Id: Ibd52783713b4936e0c2dfda8d708bf186f33b00a
Reviewed-on: https://go-review.googlesource.com/c/go/+/159977


Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarAlessandro Arzilli <alessandro.arzilli@gmail.com>
Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
parent bd680d94
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment