From 44d22e75dd9a0cbffbb04c9ce6d6bf9030634cc1 Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Sun, 9 Oct 2022 19:06:23 -0700 Subject: cmd/compile: detect write barrier completion differently Instead of keeping track of in which blocks write barriers complete, introduce a new op that marks the exact memory state where the write barrier completes. For future use. This allows us to move some of the write barrier code to between the start of the merging block and the WBend marker. Change-Id: If3809b260292667d91bf0ee18d7b4d0eb1e929f0 Reviewed-on: https://go-review.googlesource.com/c/go/+/447777 Reviewed-by: Keith Randall TryBot-Result: Gopher Robot Reviewed-by: Cherry Mui Run-TryBot: Keith Randall --- src/cmd/compile/internal/ssa/deadcode.go | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'src/cmd/compile/internal/ssa/deadcode.go') diff --git a/src/cmd/compile/internal/ssa/deadcode.go b/src/cmd/compile/internal/ssa/deadcode.go index cfadda82b0..bd4282ecdb 100644 --- a/src/cmd/compile/internal/ssa/deadcode.go +++ b/src/cmd/compile/internal/ssa/deadcode.go @@ -290,20 +290,6 @@ func deadcode(f *Func) { b.truncateValues(i) } - // Remove dead blocks from WBLoads list. - i = 0 - for _, b := range f.WBLoads { - if reachable[b.ID] { - f.WBLoads[i] = b - i++ - } - } - clearWBLoads := f.WBLoads[i:] - for j := range clearWBLoads { - clearWBLoads[j] = nil - } - f.WBLoads = f.WBLoads[:i] - // Remove unreachable blocks. Return dead blocks to allocator. i = 0 for _, b := range f.Blocks { -- cgit v1.3