]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: reserve less memory for bitvectors
authorKeith Randall <khr@golang.org>
Wed, 14 Jan 2026 17:33:10 +0000 (09:33 -0800)
committerGopher Robot <gobot@golang.org>
Thu, 22 Jan 2026 15:31:38 +0000 (07:31 -0800)
We only need 4 per block, not 7. That's almost 50% savings.

Update #77170

Change-Id: I6229a1137e7a03769e30bd4081078817de9a4f84
Reviewed-on: https://go-review.googlesource.com/c/go/+/736340
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Keith Randall <khr@golang.org>

src/cmd/compile/internal/liveness/plive.go

index 63c85ea26db605988027fb051339cd1a5520005f..4659d1046070e48752afb0c1931fb8558459ddb9 100644 (file)
@@ -427,7 +427,7 @@ func newliveness(fn *ir.Func, f *ssa.Func, vars []*ir.Name, idx map[*ir.Name]int
 
        nblocks := int32(len(f.Blocks))
        nvars := int32(len(vars))
-       bulk := bitvec.NewBulk(nvars, nblocks*7, fn.Pos())
+       bulk := bitvec.NewBulk(nvars, nblocks*4, fn.Pos())
        for _, b := range f.Blocks {
                be := lv.blockEffects(b)