]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile: simple forward-looking register allocation tweak
authorKeith Randall <khr@golang.org>
Tue, 19 Jan 2016 04:00:15 +0000 (20:00 -0800)
committerKeith Randall <khr@golang.org>
Fri, 29 Jan 2016 17:32:38 +0000 (17:32 +0000)
commit9d6e605cf7c2b8b9c279e687d06bc92a8ade6fcc
tree8879665f01dea9ef837326ed5f96aa6893d0d184
parent8a961aee286cc7c891d5e0a49ed362fe500f81f4
[dev.ssa] cmd/compile: simple forward-looking register allocation tweak

For each value that needs to be in a fixed register at the end of the
block, and try to pick that fixed register when the instruction
generating that value is scheduled (or restored from a spill).

Just used for end-of-block register requirements for now.
Fixed-register instruction requirements (e.g. shift in ecx) can be
added later.  Also two-instruction constraints (input reg == output
reg) might be recorded in a similar manner.

Change-Id: I59916e2e7f73657bb4fc3e3b65389749d7a23fa8
Reviewed-on: https://go-review.googlesource.com/18774
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/ssa/regalloc.go