From 4b654c0eeca65ffc6588ffd9c99387a7e48002c1 Mon Sep 17 00:00:00 2001 From: Cherry Mui Date: Fri, 17 Sep 2021 16:26:13 -0400 Subject: cmd/compile: SSA ".this" variable We used to not SSA ".this" variable, because in tail-call method wrappers it relies on updating ".this" in place in memory, and the tail call IR node and SSA op do not have an explicit use of ".this". It is no longer the case for the new tail call representation. Remove the restriction. Change-Id: I4e1ce8459adbb0d5a80c64f1ece982737bd95305 Reviewed-on: https://go-review.googlesource.com/c/go/+/350751 Trust: Cherry Mui Run-TryBot: Cherry Mui TryBot-Result: Go Bot Reviewed-by: David Chase --- src/cmd/compile/internal/ssagen/ssa.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/cmd/compile/internal/ssagen/ssa.go b/src/cmd/compile/internal/ssagen/ssa.go index 346a801508..08f36ce7be 100644 --- a/src/cmd/compile/internal/ssagen/ssa.go +++ b/src/cmd/compile/internal/ssagen/ssa.go @@ -5311,12 +5311,6 @@ func (s *state) canSSAName(name *ir.Name) bool { return false } } - if name.Class == ir.PPARAM && name.Sym() != nil && name.Sym().Name == ".this" { - // wrappers generated by genwrapper need to update - // the .this pointer in place. - // TODO: treat as a PPARAMOUT? - return false - } return true // TODO: try to make more variables SSAable? } -- cgit v1.2.3-54-g00ecf