diff options
| author | David Chase <drchase@google.com> | 2019-09-30 11:08:43 -0400 |
|---|---|---|
| committer | David Chase <drchase@google.com> | 2019-10-03 21:08:27 +0000 |
| commit | 53bd9151099c54ffb4fee73d8b1771e311f6a271 (patch) | |
| tree | 6fa0d341c891f669dafb6cd137c7109bb04333d8 /src | |
| parent | 6139019efaa3faa9ec94a57ab8c15b726d516664 (diff) | |
| download | go-53bd9151099c54ffb4fee73d8b1771e311f6a271.tar.xz | |
cmd/compile: classify more nodes as "poor choices" for statements
Aggregate-making nodes that are later decomposed
are poor choices for statements, because the decomposition
phase turns them into multiple sub-values, some of which may be
dead. Better to look elsewhere for a statement mark.
Change-Id: Ibd9584138ab3d1384548686896a28580a2e43f54
Reviewed-on: https://go-review.googlesource.com/c/go/+/198477
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/cmd/compile/internal/ssa/numberlines.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/ssa/numberlines.go b/src/cmd/compile/internal/ssa/numberlines.go index a39e597d59..3e6afd72ff 100644 --- a/src/cmd/compile/internal/ssa/numberlines.go +++ b/src/cmd/compile/internal/ssa/numberlines.go @@ -15,7 +15,9 @@ func isPoorStatementOp(op Op) bool { switch op { // Note that Nilcheck often vanishes, but when it doesn't, you'd love to start the statement there // so that a debugger-user sees the stop before the panic, and can examine the value. - case OpAddr, OpLocalAddr, OpOffPtr, OpStructSelect, OpConstBool, OpConst8, OpConst16, OpConst32, OpConst64, OpConst32F, OpConst64F: + case OpAddr, OpLocalAddr, OpOffPtr, OpStructSelect, + OpIMake, OpStringMake, OpSliceMake, OpStructMake0, OpStructMake1, OpStructMake2, OpStructMake3, OpStructMake4, + OpConstBool, OpConst8, OpConst16, OpConst32, OpConst64, OpConst32F, OpConst64F: return true } return false |
