Skip to content

Commit 53bd915

Browse files
committed
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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Jeremy Faller <[email protected]> Reviewed-by: Cherry Zhang <[email protected]>
1 parent 6139019 commit 53bd915

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cmd/compile/internal/ssa/numberlines.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ func isPoorStatementOp(op Op) bool {
1515
switch op {
1616
// Note that Nilcheck often vanishes, but when it doesn't, you'd love to start the statement there
1717
// so that a debugger-user sees the stop before the panic, and can examine the value.
18-
case OpAddr, OpLocalAddr, OpOffPtr, OpStructSelect, OpConstBool, OpConst8, OpConst16, OpConst32, OpConst64, OpConst32F, OpConst64F:
18+
case OpAddr, OpLocalAddr, OpOffPtr, OpStructSelect,
19+
OpIMake, OpStringMake, OpSliceMake, OpStructMake0, OpStructMake1, OpStructMake2, OpStructMake3, OpStructMake4,
20+
OpConstBool, OpConst8, OpConst16, OpConst32, OpConst64, OpConst32F, OpConst64F:
1921
return true
2022
}
2123
return false

0 commit comments

Comments
 (0)