]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: improve PPC64.rules to reduce size of rewritePPC64.go
authorLynn Boger <laboger@linux.vnet.ibm.com>
Wed, 14 Mar 2018 15:25:02 +0000 (11:25 -0400)
committerLynn Boger <laboger@linux.vnet.ibm.com>
Wed, 14 Mar 2018 19:03:05 +0000 (19:03 +0000)
commitaff222cd185d10400b9177fe26ec06eb647b092d
treed1d854fb8ceb74ab317aefadaf5b7b389b659d3c
parent7d4d2cb686d2068a9a07dbde9f2a72c237c1f4a4
cmd/compile: improve PPC64.rules to reduce size of rewritePPC64.go

Some rules in PPC64.rules cause an extremely large rewritePPC64.go
file to be generated, due to rules with commutative operations and
many operands. This happens with the existing
rules for combining byte loads in little endian order, and
also happens with the pending change to do the same for bytes
in big endian order.

The change improves the existing rules and reduces the size of
the rewrite file by more than 60%. Once this change is merged,
then the pending change for big endian ordered rules will be
updated to use rules that avoid generating an excessively large
rewrite file.

This also includes a fix to a performance regression for
littleEndian.PutUint16 on ppc64le.

Change-Id: I8d2ea42885fa2b84b30c63aa124b0a9b130564ff
Reviewed-on: https://go-review.googlesource.com/100675
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/gen/PPC64.rules
src/cmd/compile/internal/ssa/rewritePPC64.go