]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile/internal/escape: mark blankLoc as transient
authorMatthew Dempsky <mdempsky@google.com>
Tue, 15 Aug 2023 21:11:37 +0000 (14:11 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 17 Aug 2023 14:23:25 +0000 (14:23 +0000)
Discarded values never persist, so they can be transiently allocated
too.

Change-Id: I036ce0c1eea45e437142497bb7df3ecb44b56e52
Reviewed-on: https://go-review.googlesource.com/c/go/+/520256
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>

src/cmd/compile/internal/escape/escape.go

index bd80fc58326c547061829bc4844d4f22dfb0ee32..be02f1b6b0a41e6cf91d86686497e5603af6dc12 100644 (file)
@@ -130,6 +130,7 @@ func Batch(fns []*ir.Func, recursive bool) {
 
        var b batch
        b.heapLoc.escapes = true
+       b.blankLoc.transient = true
 
        // Construct data-flow graph from syntax trees.
        for _, fn := range fns {