]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile/internal/gc: reduce genValue redundancy
authorMichael Matloob <matloob@google.com>
Tue, 16 Jun 2015 18:11:16 +0000 (11:11 -0700)
committerMichael Matloob <michaelmatloob@gmail.com>
Tue, 16 Jun 2015 19:37:59 +0000 (19:37 +0000)
commit703ef06039c031d99b7420d984fded0bef11b14d
treea75d013b6d5b94d6f3b674d6468ca7038666cee7
parent3b817ef8f8e377e741ffa94ff3a5154bebe206cd
[dev.ssa] cmd/compile/internal/gc: reduce genValue redundancy

Add an asm field to opcodeTable containing the Prog's as field.
Then instructions that fill the Prog the same way can be collapsed
into a single switch case.

I'm still thinking of a better way to reduce redundancy, but
I think this might be a good temporary solution to prevent duplication
from getting out of control. What do you think?

Change-Id: I0c4a0992741f908bd357ee2707edb82e76e4ce61
Reviewed-on: https://go-review.googlesource.com/11130
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/ssa/gen/AMD64Ops.go
src/cmd/compile/internal/ssa/gen/main.go
src/cmd/compile/internal/ssa/op.go
src/cmd/compile/internal/ssa/opGen.go