]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: move flagalloc op splitting to rewrite rules
authorJosh Bleecher Snyder <josharian@gmail.com>
Sun, 10 Mar 2019 15:34:59 +0000 (08:34 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Tue, 19 Mar 2019 16:55:40 +0000 (16:55 +0000)
commit80b6812d7b33cbc16232a3b1b631aaa26be17a71
tree619231ea7d286e5e8afe474e059e052a21a298f7
parent3cb1e9d98a98abed5fbdcf78a54956851310fe30
cmd/compile: move flagalloc op splitting to rewrite rules

Flagalloc has the unenviable task of splitting
flag-generating ops that have been merged with loads
when the flags need to "spilled" (i.e. regenerated).
Since there weren't very many of them, there was a hard-coded list
of ops and bespoke code written to split them.

This change migrates load splitting into rewrite rules,
to make them easier to maintain.

Change-Id: I7750eafb888a802206c410f9c341b3133e7748b8
Reviewed-on: https://go-review.googlesource.com/c/go/+/166978
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/config.go
src/cmd/compile/internal/ssa/flagalloc.go
src/cmd/compile/internal/ssa/gen/386splitload.rules [new file with mode: 0644]
src/cmd/compile/internal/ssa/gen/AMD64splitload.rules [new file with mode: 0644]
src/cmd/compile/internal/ssa/gen/main.go
src/cmd/compile/internal/ssa/gen/rulegen.go
src/cmd/compile/internal/ssa/op.go
src/cmd/compile/internal/ssa/rewrite386splitload.go [new file with mode: 0644]
src/cmd/compile/internal/ssa/rewriteAMD64splitload.go [new file with mode: 0644]
src/cmd/dist/buildtool.go