]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: SSA ".this" variable
authorCherry Mui <cherryyz@google.com>
Fri, 17 Sep 2021 20:26:13 +0000 (16:26 -0400)
committerCherry Mui <cherryyz@google.com>
Fri, 17 Sep 2021 23:44:10 +0000 (23:44 +0000)
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 <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/ssagen/ssa.go

index 346a801508596556ee72d634fc04af0b7420b18c..08f36ce7be9a2beb58e4eecddf6aed0674a87186 100644 (file)
@@ -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?
 }