diff options
| author | Matthew Dempsky <mdempsky@google.com> | 2021-01-17 00:30:32 -0800 |
|---|---|---|
| committer | Matthew Dempsky <mdempsky@google.com> | 2021-01-17 11:14:51 +0000 |
| commit | 87845d14f9822c104cc192c8f7858a2a24d0029f (patch) | |
| tree | 9b6f10de2e76159f7027fe419eb3f4cb75390908 /src/cmd/compile/internal/deadcode/deadcode.go | |
| parent | e3027c6828230d01089afec0ab958040ba326abc (diff) | |
| download | go-87845d14f9822c104cc192c8f7858a2a24d0029f.tar.xz | |
[dev.regabi] cmd/compile: add ir.TailCallStmt
This CL splits out ORETJMP as a new TailCallStmt node, separate from
the other BranchStmt nodes. In doing so, this allows us to change it
from identifying a function by *types.Sym to identifying one by
directly pointing to the *ir.Func.
While here, also rename the operation to OTAILCALL.
Passes toolstash -cmp.
Change-Id: I273e6ea5d92bf3005ae02fb59b3240a190a6cf1b
Reviewed-on: https://go-review.googlesource.com/c/go/+/284227
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Diffstat (limited to 'src/cmd/compile/internal/deadcode/deadcode.go')
| -rw-r--r-- | src/cmd/compile/internal/deadcode/deadcode.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/deadcode/deadcode.go b/src/cmd/compile/internal/deadcode/deadcode.go index c409320fc4..520203787f 100644 --- a/src/cmd/compile/internal/deadcode/deadcode.go +++ b/src/cmd/compile/internal/deadcode/deadcode.go @@ -75,7 +75,7 @@ func stmts(nn *ir.Nodes) { // might be the target of a goto. See issue 28616. if body := body; len(body) != 0 { switch body[(len(body) - 1)].Op() { - case ir.ORETURN, ir.ORETJMP, ir.OPANIC: + case ir.ORETURN, ir.OTAILCALL, ir.OPANIC: if i > lastLabel { cut = true } |
