]> Cypherpunks repositories - gostls13.git/commit
cmd/6c, cmd/8c: add fixjmp step to regopt.
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Thu, 6 Dec 2012 06:20:03 +0000 (07:20 +0100)
committerRémy Oudompheng <oudomphe@phare.normalesup.org>
Thu, 6 Dec 2012 06:20:03 +0000 (07:20 +0100)
commit5cb1ed218944e7ce54384b7af0a7beed3965be56
tree779cc6c6978961248c07375e9e8f0aab95185d6d
parente4d2cd9d0a57f8e730e21aae16ac2e6644fd3926
cmd/6c, cmd/8c: add fixjmp step to regopt.

The fixjmp step eliminates redundant chains of JMP
instructions that are produced by the compiler during
code generation.

It is already implemented in gc, and can be adapted to 6c/8c with
the exception that JMPs refer to destination by pc instead of by
pointer. The algorithm is modified to operate on Regs instead of Progs
for this reason. The pcs are already restored later by regopt.

R=goalng-dev, rsc
CC=golang-dev
https://golang.org/cl/6865046
src/cmd/6c/list.c
src/cmd/6c/reg.c
src/cmd/8c/list.c
src/cmd/8c/reg.c