diff options
| author | Keith Randall <khr@golang.org> | 2023-01-26 14:43:12 -0800 |
|---|---|---|
| committer | Keith Randall <khr@google.com> | 2023-01-27 03:32:07 +0000 |
| commit | 4e3abee245755d741987132fb22c442af2dab1de (patch) | |
| tree | 014a07c5ab1e522bb12193099ae26a516cafa90d /src/cmd | |
| parent | 5ad799ef8a8178f1f958206dc587b37d8406fbcb (diff) | |
| download | go-4e3abee245755d741987132fb22c442af2dab1de.tar.xz | |
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>
Diffstat (limited to 'src/cmd')
| -rw-r--r-- | src/cmd/compile/internal/walk/switch.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/walk/switch.go b/src/cmd/compile/internal/walk/switch.go index 8ca8fa82e1..67af2ae57e 100644 --- a/src/cmd/compile/internal/walk/switch.go +++ b/src/cmd/compile/internal/walk/switch.go @@ -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 { |
