]> Cypherpunks repositories - gostls13.git/commit
6l: function at a time code layout
authorRuss Cox <rsc@golang.org>
Fri, 15 Oct 2010 19:18:47 +0000 (15:18 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 15 Oct 2010 19:18:47 +0000 (15:18 -0400)
commit9c204852682037091e40d5a326707180237451b4
tree0c4ce99764e4028a5c3a2eb15367f3e338c3b214
parent837c204ada1d0a4cfdcce6b34e17bc8f69732f83
6l: function at a time code layout

Also change the span-dependent jump algorithm
to use fewer iterations:

* resolve forward jumps at their targets (comefrom list)
* mark jumps as small or big and only do small->big
* record whether a jump failed to be encodable

These changes mean that a function with only small
jumps can be laid out in a single iteration, and the
vast majority of functions take just two iterations.
I was seeing a maximum of 5 iterations before; the
max now is 3 and there are fewer that get even that far.

R=ken2
CC=golang-dev
https://golang.org/cl/2537041
src/cmd/5l/5.out.h
src/cmd/6l/6.out.h
src/cmd/6l/asm.c
src/cmd/6l/l.h
src/cmd/6l/span.c
src/cmd/8l/8.out.h
src/cmd/ld/data.c
src/cmd/ld/lib.h