mirror of
https://github.com/golang/go
synced 2024-11-18 09:24:54 -07:00
cmd/compile: remove go119UseJumpTables flag
Change-Id: Iaaac46e96b74289096ce0c6186c73000d1fc6faa Reviewed-on: https://go-review.googlesource.com/c/go/+/463224 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Keith Randall <khr@google.com> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
5ad799ef8a
commit
4e3abee245
@ -286,11 +286,10 @@ func (s *exprSwitch) search(cc []exprClause, out *ir.Nodes) {
|
||||
|
||||
// Try to implement the clauses with a jump table. Returns true if successful.
|
||||
func (s *exprSwitch) tryJumpTable(cc []exprClause, out *ir.Nodes) bool {
|
||||
const go119UseJumpTables = true
|
||||
const minCases = 8 // have at least minCases cases in the switch
|
||||
const minDensity = 4 // use at least 1 out of every minDensity entries
|
||||
|
||||
if !go119UseJumpTables || base.Flag.N != 0 || !ssagen.Arch.LinkArch.CanJumpTable || base.Ctxt.Retpoline {
|
||||
if base.Flag.N != 0 || !ssagen.Arch.LinkArch.CanJumpTable || base.Ctxt.Retpoline {
|
||||
return false
|
||||
}
|
||||
if len(cc) < minCases {
|
||||
|
Loading…
Reference in New Issue
Block a user