From 44c0586931344c2c218b8074972b18fd5ff440bc Mon Sep 17 00:00:00 2001 From: David Chase Date: Thu, 9 Jul 2020 15:47:26 -0400 Subject: cmd/compile: add code to expand calls just before late opt Still needs to generate the calls that will need lowering. Change-Id: Ifd4e510193441a5e27c462c1f1d704f07bf6dec3 Reviewed-on: https://go-review.googlesource.com/c/go/+/242359 Trust: David Chase Run-TryBot: David Chase TryBot-Result: Go Bot Reviewed-by: Cherry Zhang --- src/cmd/compile/internal/ssa/func.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/cmd/compile/internal/ssa/func.go') diff --git a/src/cmd/compile/internal/ssa/func.go b/src/cmd/compile/internal/ssa/func.go index 32df0c06f3..0df7b4a5d7 100644 --- a/src/cmd/compile/internal/ssa/func.go +++ b/src/cmd/compile/internal/ssa/func.go @@ -775,3 +775,25 @@ func (f *Func) logDebugHashMatch(evname, name string) { func DebugNameMatch(evname, name string) bool { return os.Getenv(evname) == name } + +func (f *Func) spSb() (sp, sb *Value) { + initpos := f.Entry.Pos + for _, v := range f.Entry.Values { + if v.Op == OpSB { + sb = v + } + if v.Op == OpSP { + sp = v + } + if sb != nil && sp != nil { + break + } + } + if sb == nil { + sb = f.Entry.NewValue0(initpos, OpSB, f.Config.Types.Uintptr) + } + if sp == nil { + sp = f.Entry.NewValue0(initpos, OpSP, f.Config.Types.Uintptr) + } + return +} -- cgit v1.3 From 2e7706d1fa50edd1bc9fa6a4d1eeb58d10fa2536 Mon Sep 17 00:00:00 2001 From: soolaugust Date: Mon, 12 Oct 2020 07:13:18 +0000 Subject: ssa: comment Sdom() with the form "Sdom..." Change-Id: I7ddb3d178e5437a7c3d8e94a089ac7a476a7dc85 GitHub-Last-Rev: bc27289128079f294ec149ccc4539ad29b859c9f GitHub-Pull-Request: golang/go#41925 Reviewed-on: https://go-review.googlesource.com/c/go/+/261437 Trust: Alberto Donizetti Reviewed-by: Keith Randall --- src/cmd/compile/internal/ssa/func.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cmd/compile/internal/ssa/func.go') diff --git a/src/cmd/compile/internal/ssa/func.go b/src/cmd/compile/internal/ssa/func.go index 0df7b4a5d7..ec2c67c1fa 100644 --- a/src/cmd/compile/internal/ssa/func.go +++ b/src/cmd/compile/internal/ssa/func.go @@ -672,7 +672,7 @@ func (f *Func) Idom() []*Block { return f.cachedIdom } -// sdom returns a sparse tree representing the dominator relationships +// Sdom returns a sparse tree representing the dominator relationships // among the blocks of f. func (f *Func) Sdom() SparseTree { if f.cachedSdom == nil { -- cgit v1.3 From 0ecf7696335a3aade9e41843acfd5ab188d2511f Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Thu, 26 Nov 2020 23:28:11 +0700 Subject: cmd/compile: do not mark OpSP, OpSB pos for debugging Fixes #42801 Change-Id: I2080ecacc109479f5820035401ce2b26d72e2ef2 Reviewed-on: https://go-review.googlesource.com/c/go/+/273506 Trust: Cuong Manh Le Run-TryBot: Cuong Manh Le TryBot-Result: Go Bot Reviewed-by: Cherry Zhang Reviewed-by: David Chase --- src/cmd/compile/internal/ssa/func.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cmd/compile/internal/ssa/func.go') diff --git a/src/cmd/compile/internal/ssa/func.go b/src/cmd/compile/internal/ssa/func.go index ec2c67c1fa..e6f899a2c7 100644 --- a/src/cmd/compile/internal/ssa/func.go +++ b/src/cmd/compile/internal/ssa/func.go @@ -790,10 +790,10 @@ func (f *Func) spSb() (sp, sb *Value) { } } if sb == nil { - sb = f.Entry.NewValue0(initpos, OpSB, f.Config.Types.Uintptr) + sb = f.Entry.NewValue0(initpos.WithNotStmt(), OpSB, f.Config.Types.Uintptr) } if sp == nil { - sp = f.Entry.NewValue0(initpos, OpSP, f.Config.Types.Uintptr) + sp = f.Entry.NewValue0(initpos.WithNotStmt(), OpSP, f.Config.Types.Uintptr) } return } -- cgit v1.3