1
0
mirror of https://github.com/golang/go synced 2024-09-30 04:24:29 -06:00
go/test
Martin Möhrmann e6f9f39ce5 cmd/compile: generate makeslice calls with int arguments
Where possible generate calls to runtime makeslice with int arguments
during compile time instead of makeslice with int64 arguments.

This eliminates converting arguments for calls to makeslice with
int64 arguments for platforms where int64 values do not fit into
arguments of type int.

godoc 386 binary shrinks by approximately 12 kilobyte.

amd64:
name         old time/op  new time/op  delta
MakeSlice-2  29.8ns ± 1%  29.8ns ± 1%   ~     (p=1.000 n=24+24)

386:
name         old time/op  new time/op  delta
MakeSlice-2  52.3ns ± 0%  45.9ns ± 0%  -12.17%  (p=0.000 n=25+22)

Fixes  #15357

Change-Id: Icb8701bb63c5a83877d26c8a4b78e782ba76de7c
Reviewed-on: https://go-review.googlesource.com/27851
Run-TryBot: Martin Möhrmann <martisch@uos.de>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2016-08-29 18:25:33 +00:00
..
bench all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
bugs all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
chan all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
ddd2.dir all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
dwarf
fixedbugs cmd/compile: generate makeslice calls with int arguments 2016-08-29 18:25:33 +00:00
import2.dir all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
import4.dir
interface cmd/compile: inline x, ok := y.(T) where T is a scalar 2016-08-17 01:12:01 +00:00
intrinsic.dir cmd/compile: clean up ctz ops 2016-08-23 23:45:12 +00:00
ken all: fix spelling mistakes 2016-04-03 17:03:15 +00:00
method4.dir
safe
stress all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
syntax cmd/compile/internal/syntax: match old parser errors and line numbers 2016-08-19 01:10:21 +00:00
uintptrescapes.dir cmd/compile, syscall: add //go:uintptrescapes comment, and use it 2016-07-06 20:48:41 +00:00
64bit.go
235.go
alg.go test: add test that required algs get generated 2016-04-24 21:36:52 +00:00
alias1.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
alias.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
append.go
args.go
assign1.go
assign.go
atomicload.go cmd/compile: keep value use counts in SSA 2016-03-17 04:20:02 +00:00
bigalg.go
bigmap.go
blank1.go
blank.go
bom.go
bombad.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
bounds.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
chancap.go
chanlinear.go
char_lit1.go
char_lit.go
checkbce.go cmd/compile: optimize integer "in range" expressions 2016-08-25 03:49:16 +00:00
clearfat.go
closedchan.go
closure1.go
closure2.go
closure.go
cmp6.go
cmp.go
cmplx.go
cmplxdivide1.go
cmplxdivide.c all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
cmplxdivide.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
complit1.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
complit.go
compos.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
const1.go
const2.go
const3.go
const4.go
const5.go
const6.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
const.go
convert1.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
convert3.go
convert.go
convlit1.go
convlit.go
convT2X.go
copy.go
crlf.go
ddd1.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
ddd2.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
ddd.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
decl.go
declbad.go
defer.go
deferfin.go
deferprint.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
deferprint.out
divide.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
divmod.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
empty.go
env.go
eof1.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
eof.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
errchk cmd/vet: make checking example names in _test packages more robust 2016-06-28 22:09:00 +00:00
escape2.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
escape2n.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
escape3.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
escape4.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
escape5.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
escape_array.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
escape_because.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
escape_calls.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
escape_closure.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
escape_field.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
escape_iface.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
escape_indir.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
escape_level.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
escape_map.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
escape_param.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
escape_slice.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
escape_struct_param1.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
escape_struct_param2.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
escape_struct_return.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
escape.go
fibo.go
finprofiled.go
float_lit2.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
float_lit3.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
float_lit.go
floatcmp.go
for.go
func1.go
func2.go
func3.go
func4.go
func5.go
func6.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
func7.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
func8.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
func.go
funcdup2.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
funcdup.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
gc1.go
gc2.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
gc.go
gcstring.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
goprint.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
goprint.out
goto.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
heapsampling.go
helloworld.go
helloworld.out
if.go
import1.go
import2.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
import4.go
import5.go
import.go
index0.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
index1.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
index2.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
index.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
indirect1.go
indirect.go
init1.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
init.go
initcomma.go
initialize.go
initializerr.go
initloop.go
inline.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
int_lit.go
intcvt.go
intrinsic.go cmd/compile: added some intrinsics to SSA back end 2016-03-28 16:29:59 +00:00
iota.go
label1.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
label.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
linkmain_run.go test: fix linkmain test 2015-12-17 23:36:13 +00:00
linkmain.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
linkobj.go cmd/compile: add -linkobj flag to allow writing object file in two parts 2016-05-09 17:31:45 +00:00
linkx_run.go test: print output on link -X failure 2016-04-20 17:37:35 +00:00
linkx.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
literal.go
live1.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
live2.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
live_ssa.go cmd/compile: add MIPS64 optimizations, SSA on by default 2016-08-26 19:45:06 +00:00
live_syscall.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
live.go cmd/compile: add MIPS64 optimizations, SSA on by default 2016-08-26 19:45:06 +00:00
loopbce.go cmd/compile: bce when max and limit are consts 2016-04-11 16:01:22 +00:00
mallocfin.go
map1.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
map.go
maplinear.go
method1.go cmd/compile: ignore receiver parameters in Eqtype 2016-03-17 00:38:15 +00:00
method2.go
method3.go
method4.go
method5.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
method.go
named1.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
named.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
nil.go
nilcheck.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
nilptr2.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
nilptr3_ssa.go cmd/compile: add MIPS64 optimizations, SSA on by default 2016-08-26 19:45:06 +00:00
nilptr3.go test: add test for CL 26831 2016-08-17 14:50:34 +00:00
nilptr4.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
nilptr.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
nosplit.go cmd/compile: ppc64le working, not optimized enough 2016-08-18 16:34:47 +00:00
nul1.go cmd/compile/internal/syntax: match old parser errors and line numbers 2016-08-19 01:10:21 +00:00
opt_branchlikely.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
parentype.go
peano.go
phiopt.go cmd/compile: introduce bool operations. 2016-04-25 20:43:04 +00:00
print.go
print.out
printbig.go
printbig.out
prove.go cmd/compile: transform some Phis into Or8. 2016-04-19 22:04:30 +00:00
range.go
recover1.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
recover2.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
recover3.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
recover4.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
recover.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
reflectmethod1.go cmd/compile: track reflect.Type.Method in deadcode 2016-03-11 21:19:20 +00:00
reflectmethod2.go cmd/compile: track reflect.Type.Method in deadcode 2016-03-11 21:19:20 +00:00
reflectmethod3.go cmd/compile: track reflect.Type.Method in deadcode 2016-03-11 21:19:20 +00:00
reflectmethod4.go cmd/link: treat reflect.Value.Method like Call 2016-03-11 22:07:02 +00:00
rename1.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
rename.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
reorder2.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
reorder.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
return.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
rotate0.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
rotate1.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
rotate2.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
rotate3.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
rotate.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
run.go test: remove unused variable 2016-08-16 21:46:54 +00:00
rune.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
runtime.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
shift1.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
shift2.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
sieve.go
sigchld.go
sigchld.out
simassign.go
sinit_run.go
sinit.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
sizeof.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
slice3.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
slice3err.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
slicecap.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
sliceopt.go cmd/compile: add MIPS64 optimizations, SSA on by default 2016-08-26 19:45:06 +00:00
solitaire.go
stack.go
strength.go cmd/compile: generalize strength reduction of mulq 2016-03-30 22:27:13 +00:00
string_lit.go
stringrange.go
struct0.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
switch2.go cmd/compile/internal/syntax: match old parser errors and line numbers 2016-08-19 01:10:21 +00:00
switch3.go
switch4.go
switch5.go cmd/compile: use a map to track const switch cases 2016-08-23 05:28:33 +00:00
switch6.go cmd/compile: set correct line number for multiple defaults in switch error 2016-08-22 19:56:06 +00:00
switch.go
tinyfin.go
torture.go
turing.go
typecheck.go
typecheckloop.go
typeswitch1.go
typeswitch2.go
typeswitch3.go
typeswitch.go
uintptrescapes2.go cmd/compile, syscall: add //go:uintptrescapes comment, and use it 2016-07-06 20:48:41 +00:00
uintptrescapes.go cmd/compile, syscall: add //go:uintptrescapes comment, and use it 2016-07-06 20:48:41 +00:00
undef.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
utf.go
varerr.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
varinit.go
writebarrier.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
zerodivide.go