aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/export_test.go
diff options
context:
space:
mode:
authorDavid Chase <drchase@google.com>2020-08-17 16:57:22 -0400
committerDavid Chase <drchase@google.com>2020-10-23 18:02:16 +0000
commitc3fe874f25ff55f73e4422bea7aa0b0e0e268f3e (patch)
tree2c0c9185cbabc515fce9e8471ee4282bf2c10a7f /src/cmd/compile/internal/ssa/export_test.go
parentad642727247383079c8546ca365172859641a800 (diff)
downloadgo-c3fe874f25ff55f73e4422bea7aa0b0e0e268f3e.tar.gz
go-c3fe874f25ff55f73e4422bea7aa0b0e0e268f3e.zip
cmd/compile: avoid generating CSEs; do all aggregates; maintain debug names
This adds a pass to detect common selection operations, to avoid generating duplicates. Duplicate offsets are also detected. All aggregate types are now handled; there is some freedom in where expand_calls is run, though it must run before softfloat. Debug-name-maintenance is now incremental both in decompose builtin and in expand_calls; it might be good to push this into all the decompose passes. (this is a smash of 5 CLs that rewrote some of the same code several times to deal with phase-ordering problems, and included an abandoned attempt.) For #40724. Change-Id: I2a0c32f20660bf8b99e2bcecd33545d97d2bd3c6 Reviewed-on: https://go-review.googlesource.com/c/go/+/249458 Trust: David Chase <drchase@google.com> Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/export_test.go')
-rw-r--r--src/cmd/compile/internal/ssa/export_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/ssa/export_test.go b/src/cmd/compile/internal/ssa/export_test.go
index 51665c60e2..b4c3e5cfdf 100644
--- a/src/cmd/compile/internal/ssa/export_test.go
+++ b/src/cmd/compile/internal/ssa/export_test.go
@@ -125,6 +125,10 @@ func (d DummyFrontend) SplitStruct(s LocalSlot, i int) LocalSlot {
func (d DummyFrontend) SplitArray(s LocalSlot) LocalSlot {
return LocalSlot{N: s.N, Type: s.Type.Elem(), Off: s.Off}
}
+
+func (d DummyFrontend) SplitSlot(parent *LocalSlot, suffix string, offset int64, t *types.Type) LocalSlot {
+ return LocalSlot{N: parent.N, Type: t, Off: offset}
+}
func (DummyFrontend) Line(_ src.XPos) string {
return "unknown.go:0"
}