]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.regabi] cmd/compile: change nowritebarrierrec to use map[*ir.Func]
authorMatthew Dempsky <mdempsky@google.com>
Sun, 6 Dec 2020 00:33:59 +0000 (16:33 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Sun, 6 Dec 2020 21:05:50 +0000 (21:05 +0000)
All of the uses were already using *ir.Func index operands, so only
needs the map type itself updated.

Passes buildall w/ toolstash -cmp.

Updates #42982.

Change-Id: I568d8601f3eb077e07e887f2071aa1a2667d803c
Reviewed-on: https://go-review.googlesource.com/c/go/+/275754
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>

src/cmd/compile/internal/gc/dcl.go

index 56f8d1b9bf79d692233410025e1b6434efc82e7e..5936aeb950152ea1980c8f35d430c7748085447a 100644 (file)
@@ -838,7 +838,7 @@ type nowritebarrierrecChecker struct {
        // extraCalls contains extra function calls that may not be
        // visible during later analysis. It maps from the ODCLFUNC of
        // the caller to a list of callees.
-       extraCalls map[ir.Node][]nowritebarrierrecCall
+       extraCalls map[*ir.Func][]nowritebarrierrecCall
 
        // curfn is the current function during AST walks.
        curfn *ir.Func
@@ -853,7 +853,7 @@ type nowritebarrierrecCall struct {
 // must be called before transformclosure and walk.
 func newNowritebarrierrecChecker() *nowritebarrierrecChecker {
        c := &nowritebarrierrecChecker{
-               extraCalls: make(map[ir.Node][]nowritebarrierrecCall),
+               extraCalls: make(map[*ir.Func][]nowritebarrierrecCall),
        }
 
        // Find all systemstack calls and record their targets. In
@@ -929,7 +929,7 @@ func (c *nowritebarrierrecChecker) check() {
        // that are directly marked go:nowritebarrierrec are in this
        // map with a zero-valued nowritebarrierrecCall. This also
        // acts as the set of marks for the BFS of the call graph.
-       funcs := make(map[ir.Node]nowritebarrierrecCall)
+       funcs := make(map[*ir.Func]nowritebarrierrecCall)
        // q is the queue of ODCLFUNC Nodes to visit in BFS order.
        var q ir.NameQueue