cmd/compile: speed up hot phi insertion code
cmd/compile: speed up hot phi insertion code

This speeds up compilation of the code in #8225 by 25%-30%.
The complexity of the algorithm is unchanged,
but this shrinks the constant factor so much that it doesn't matter,
even the size of the giant type switch gets scaled up dramatically.

name       old time/op      new time/op      delta
Template        218ms ± 5%       217ms ±10%    ~           (p=0.163 n=27+30)
Unicode        98.2ms ± 6%      97.7ms ±10%    ~           (p=0.150 n=27+29)
GoTypes         654ms ± 5%       650ms ± 5%    ~           (p=0.350 n=30+30)
Compiler        2.70s ± 4%       2.68s ± 3%    ~           (p=0.128 n=30+29)

name       old user-ns/op   new user-ns/op   delta
Template   276user-ms ± 6%  271user-ms ± 7%  -1.83%        (p=0.003 n=29+28)
Unicode    138user-ms ± 5%  137user-ms ± 4%    ~           (p=0.071 n=27+27)
GoTypes    881user-ms ± 4%  877user-ms ± 4%    ~           (p=0.423 n=30+30)
Compiler   3.76user-s ± 4%  3.72user-s ± 2%  -0.84%        (p=0.028 n=30+29)

name       old alloc/op     new alloc/op     delta
Template       40.7MB ± 0%      40.7MB ± 0%    ~           (p=0.936 n=30+30)
Unicode        30.8MB ± 0%      30.8MB ± 0%    ~           (p=0.859 n=28+30)
GoTypes         123MB ± 0%       123MB ± 0%    ~           (p=0.273 n=30+30)
Compiler        472MB ± 0%       472MB ± 0%    ~           (p=0.432 n=30+30)

name       old allocs/op    new allocs/op    delta
Template         401k ± 1%        401k ± 1%    ~           (p=0.859 n=30+30)
Unicode          331k ± 0%        331k ± 1%    ~           (p=0.823 n=28+30)
GoTypes         1.24M ± 0%       1.24M ± 0%    ~           (p=0.286 n=30+30)
Compiler        4.26M ± 0%       4.26M ± 0%    ~           (p=0.359 n=30+30)

Change-Id: Ia850065a9a84c07a5b0b4e23c1758b5679498da7
Reviewed-on: https://go-review.googlesource.com/36112
Run-TryBot: Josh Bleecher Snyder <cdc248cc4d32e4fbfe04e45228163bcecd48a0b9@gmail.com>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Keith Randall <8c99c3a9284e493be632950b84cd789d08ed3e9d@golang.org>

josharian/go,polyverse-security/go,CAFxX/go,vsekhar/elastic-go,golang/go,josharian/go,cloudflare/go,nawawi/go,linux-on-ibm-z/go,vsekhar/elastic-go,cloudflare/go,linux-on-ibm-z/go,codestation/go,golang/go,derekmarcotte/go,cloudflare/go,linux-on-ibm-z/go,ImJasonH/go,vsekhar/elastic-go,ImJasonH/go,derekmarcotte/go,polyverse-security/go,Cofyc/go,josharian/go,nawawi/go,codestation/go,golang/go,codestation/go,akutz/go,nawawi/go,nawawi/go,CAFxX/go,akutz/go,linux-on-ibm-z/go,derekmarcotte/go,codestation/go,derekmarcotte/go,polyverse-security/go,golang/go,vsekhar/elastic-go,cloudflare/go,golang/go,CAFxX/go,vsekhar/elastic-go,josharian/go,CAFxX/go,polyverse-security/go,nawawi/go,christopher-henderson/Go,ImJasonH/go,ImJasonH/go,ImJasonH/go,ImJasonH/go,Cofyc/go,cloudflare/go,codestation/go,derekmarcotte/go,akutz/go,CAFxX/go,Cofyc/go,Cofyc/go,nawawi/go,CAFxX/go,josharian/go,derekmarcotte/go,akutz/go,golang/go,vsekhar/elastic-go,ImJasonH/go,Cofyc/go,cloudflare/go,codestation/go,nawawi/go,nawawi/go,CAFxX/go,linux-on-ibm-z/go,golang/go,vsekhar/elastic-go,polyverse-security/go,akutz/go,akutz/go,vsekhar/elastic-go,linux-on-ibm-z/go,linux-on-ibm-z/go,derekmarcotte/go,cloudflare/go,CAFxX/go,josharian/go,linux-on-ibm-z/go,josharian/go,derekmarcotte/go,polyverse-security/go,polyverse-security/go,josharian/go,cloudflare/go,polyverse-security/go,akutz/go,ImJasonH/go,golang/go,codestation/go,akutz/go,Cofyc/go,Cofyc/go,Cofyc/go,codestation/go