]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/ssa: use math/bits for register sets
authorHeschi Kreinick <heschi@google.com>
Mon, 29 Jan 2018 21:09:11 +0000 (16:09 -0500)
committerHeschi Kreinick <heschi@google.com>
Wed, 14 Feb 2018 18:29:22 +0000 (18:29 +0000)
commit7ac756f74b1a7dfc984152d863b3e3c86f90b2c7
tree78a883e23127b0a125613acde9708837b83e079a
parent39eea62340a129154d3c2c2347386e8af762d6d1
cmd/compile/internal/ssa: use math/bits for register sets

Using bits.TrailingZeroes instead of iterating over each bit is a small
but easy win for the common case of only one or two registers being set.

I copied in the implementation for use with pre-1.9 bootstraps.

Change-Id: Ieaa768554d7d5239a5617fbf34f1ee0b32ce1de5
Reviewed-on: https://go-review.googlesource.com/92395
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/ssa/bits_bootstrap.go [new file with mode: 0644]
src/cmd/compile/internal/ssa/bits_go19.go [new file with mode: 0644]
src/cmd/compile/internal/ssa/debug.go