]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: remove go119UseJumpTables flag
authorKeith Randall <khr@golang.org>
Thu, 26 Jan 2023 22:43:12 +0000 (14:43 -0800)
committerKeith Randall <khr@google.com>
Fri, 27 Jan 2023 03:32:07 +0000 (03:32 +0000)
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>

src/cmd/compile/internal/walk/switch.go

index 8ca8fa82e150f32e0b860d13e5d22ae3ca8a0f5f..67af2ae57ebd107df3952ac3ac779b1e9f6124c5 100644 (file)
@@ -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 {