aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/writebarrier.go
diff options
context:
space:
mode:
authorDavid Chase <drchase@google.com>2020-06-12 13:48:26 -0400
committerDavid Chase <drchase@google.com>2020-09-16 20:57:24 +0000
commitb4ef49e527787ec932d0b371bb24c3fc370b1e8d (patch)
tree797af18469a87f78659d0678295e4465e7e2a2c0 /src/cmd/compile/internal/ssa/writebarrier.go
parent7ee35cb301eddf4d53e7bb2d5bf0873922d63a6e (diff)
downloadgo-b4ef49e527787ec932d0b371bb24c3fc370b1e8d.tar.gz
go-b4ef49e527787ec932d0b371bb24c3fc370b1e8d.zip
cmd/compile: introduce special ssa Aux type for calls
This is prerequisite to moving call expansion later into SSA, and probably a good idea anyway. Passes tests. This is the first minimal CL that does a 1-for-1 substitution of *ssa.AuxCall for *obj.LSym. Next step (next CL) is to make this change for all calls so that additional information can be stored in AuxCall. Change-Id: Ia3a7715648fd9fb1a176850767a726e6f5b959eb Reviewed-on: https://go-review.googlesource.com/c/go/+/237680 Trust: David Chase <drchase@google.com> Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/writebarrier.go')
-rw-r--r--src/cmd/compile/internal/ssa/writebarrier.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/ssa/writebarrier.go b/src/cmd/compile/internal/ssa/writebarrier.go
index 214798a1ab..c358406862 100644
--- a/src/cmd/compile/internal/ssa/writebarrier.go
+++ b/src/cmd/compile/internal/ssa/writebarrier.go
@@ -523,7 +523,7 @@ func wbcall(pos src.XPos, b *Block, fn, typ *obj.LSym, ptr, val, mem, sp, sb *Va
off = round(off, config.PtrSize)
// issue call
- mem = b.NewValue1A(pos, OpStaticCall, types.TypeMem, fn, mem)
+ mem = b.NewValue1A(pos, OpStaticCall, types.TypeMem, &AuxCall{fn}, mem)
mem.AuxInt = off - config.ctxt.FixedFrameSize()
return mem
}
@@ -582,7 +582,7 @@ func IsNewObject(v *Value, mem *Value) bool {
if mem.Op != OpStaticCall {
return false
}
- if !isSameSym(mem.Aux, "runtime.newobject") {
+ if !isSameCall(mem.Aux, "runtime.newobject") {
return false
}
if v.Args[0].Op != OpOffPtr {