• Cherry Zhang's avatar
    cmd/compile: get rid of "volatile" in SSA · 5bfd1ef0
    Cherry Zhang authored
    A value is "volatile" if it is a pointer to the argument region
    on stack which will be clobbered by function call. This is used
    to make sure the value is safe when inserting write barrier calls.
    The writebarrier pass can tell whether a value is such a pointer.
    Therefore no need to mark it when building SSA and thread this
    information through.
    
    Passes "toolstash -cmp" on std.
    
    Updates #17583.
    
    Change-Id: Idc5fc0d710152b94b3c504ce8db55ea9ff5b5195
    Reviewed-on: https://go-review.googlesource.com/36835
    Run-TryBot: Cherry Zhang <cherryyz@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarKeith Randall <khr@golang.org>
    5bfd1ef0
writebarrier.go 8.66 KB