Lynn Boger
815509ae31
cmd/compile: improve lowered moves and zeros for ppc64le
...
This change includes the following:
- Generate LXV/STXV sequences instead of LXVD2X/STXVD2X on power9.
These instructions do not require an index register, which
allows more loads and stores within a loop without initializing
multiple index registers. The LoweredQuadXXX generate LXV/STXV.
- Create LoweredMoveXXXShort and LoweredZeroXXXShort for short
moves that don't generate loops, and therefore don't clobber the
address registers or flags.
- Use registers other than R3 and R4 to avoid conflicting with
registers that have already been allocated to avoid unnecessary
register moves.
- Eliminate the use of R14 as scratch register and use R31
instead.
- Add PCALIGN when the LoweredMoveXXX or LoweredZeroXXX generates a
loop with more than 3 iterations.
This performance opportunity was noticed in github.com/golang/snappy
benchmarks. Results on power9:
WordsDecode1e1 54.1ns ± 0% 53.8ns ± 0% -0.51% (p=0.029 n=4+4)
WordsDecode1e2 287ns ± 0% 282ns ± 1% -1.83% (p=0.029 n=4+4)
WordsDecode1e3 3.98µs ± 0% 3.64µs ± 0% -8.52% (p=0.029 n=4+4)
WordsDecode1e4 66.9µs ± 0% 67.0µs ± 0% +0.20% (p=0.029 n=4+4)
WordsDecode1e5 723µs ± 0% 723µs ± 0% -0.01% (p=0.200 n=4+4)
WordsDecode1e6 7.21ms ± 0% 7.21ms ± 0% -0.02% (p=1.000 n=4+4)
WordsEncode1e1 29.9ns ± 0% 29.4ns ± 0% -1.51% (p=0.029 n=4+4)
WordsEncode1e2 2.12µs ± 0% 1.75µs ± 0% -17.70% (p=0.029 n=4+4)
WordsEncode1e3 11.7µs ± 0% 11.2µs ± 0% -4.61% (p=0.029 n=4+4)
WordsEncode1e4 119µs ± 0% 120µs ± 0% +0.36% (p=0.029 n=4+4)
WordsEncode1e5 1.21ms ± 0% 1.22ms ± 0% +0.41% (p=0.029 n=4+4)
WordsEncode1e6 12.0ms ± 0% 12.0ms ± 0% +0.57% (p=0.029 n=4+4)
RandomEncode 286µs ± 0% 203µs ± 0% -28.82% (p=0.029 n=4+4)
ExtendMatch 47.4µs ± 0% 47.0µs ± 0% -0.85% (p=0.029 n=4+4)
Change-Id: Iecad3a39ae55280286e42760a5c9d5c1168f5858
Reviewed-on: https://go-review.googlesource.com/c/go/+/226539
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-04-06 12:09:39 +00:00
..
2017-01-20 05:55:53 +00:00
2019-03-06 18:53:12 +00:00
2020-03-25 22:22:20 +00:00
2019-04-02 16:34:03 +00:00
2020-04-06 12:09:39 +00:00
2016-05-02 13:43:18 +00:00
2013-01-11 22:00:48 +01:00
2020-04-01 06:12:05 +00:00
2016-05-02 13:43:18 +00:00
2015-10-07 14:37:44 +00:00
2019-11-06 09:09:59 +00:00
2017-03-16 02:44:16 +00:00
2019-09-08 17:28:20 +00:00
2019-09-16 15:30:51 +00:00
2014-01-07 13:26:48 +01:00
2019-04-16 16:20:39 +00:00
2018-03-01 21:11:16 +00:00
2019-08-28 19:27:20 +00:00
2016-05-02 13:43:18 +00:00
2020-02-21 22:57:52 +00:00
2016-07-06 20:48:41 +00:00
2013-01-30 20:21:08 +01:00
2016-04-24 21:36:52 +00:00
2016-05-02 13:43:18 +00:00
2018-04-05 22:01:17 +00:00
2017-01-20 05:55:53 +00:00
2016-05-02 13:43:18 +00:00
2018-04-09 18:57:37 +00:00
2018-05-06 04:28:23 +00:00
2018-05-06 04:28:23 +00:00
2017-05-11 13:53:54 +00:00
2014-10-06 17:16:39 -04:00
2016-03-17 04:20:02 +00:00
2013-02-12 13:17:49 -05:00
2020-03-29 17:12:56 +00:00
2013-10-08 14:36:20 -04:00
2016-05-02 13:43:18 +00:00
2018-05-29 02:39:16 +00:00
2018-11-26 14:06:28 +00:00
2020-03-29 17:12:56 +00:00
2019-03-06 20:04:07 +00:00
2014-10-31 11:08:27 -04:00
2015-01-29 13:07:30 +00:00
2019-09-08 17:28:20 +00:00
2018-10-06 15:40:03 +00:00
2018-08-14 09:19:38 +00:00
2014-01-31 00:30:56 +01:00
2015-06-26 03:38:21 +00:00
2019-03-14 21:00:20 +00:00
2017-03-15 22:45:17 +00:00
2017-03-15 22:45:17 +00:00
2017-03-15 22:45:17 +00:00
2019-09-26 18:45:53 +00:00
2016-05-02 13:43:18 +00:00
2019-03-28 17:46:55 +00:00
2015-07-11 14:36:33 +00:00
2015-07-11 14:36:33 +00:00
2016-05-02 13:43:18 +00:00
2019-09-26 23:54:29 +00:00
2016-05-02 13:43:18 +00:00
2016-10-04 17:10:47 +00:00
2019-09-06 23:15:48 +00:00
2019-03-14 21:00:20 +00:00
2013-02-12 13:17:49 -05:00
2019-09-06 23:15:48 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2013-02-12 13:17:49 -05:00
2013-02-12 13:17:49 -05:00
2020-02-26 16:54:17 +00:00
2014-01-24 22:35:11 +04:00
2019-10-16 00:05:37 +00:00
2018-05-31 17:36:45 +00:00
2017-03-14 18:49:23 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2019-09-25 17:06:15 +00:00
2019-09-25 17:06:15 +00:00
2016-05-02 13:43:18 +00:00
2019-04-02 16:34:03 +00:00
2019-09-03 17:52:06 +00:00
2019-09-16 15:30:51 +00:00
2019-09-16 15:30:51 +00:00
2019-09-16 15:30:51 +00:00
2019-09-16 15:30:51 +00:00
2019-09-06 01:35:46 +00:00
2019-11-16 20:31:45 +00:00
2019-09-25 17:07:09 +00:00
2019-09-16 15:30:51 +00:00
2019-09-03 17:52:06 +00:00
2019-09-03 17:52:06 +00:00
2019-10-07 18:50:14 +00:00
2019-04-17 22:55:26 +00:00
2019-04-17 16:36:56 +00:00
2020-03-31 21:51:51 +00:00
2019-09-16 15:30:51 +00:00
2019-09-16 15:30:51 +00:00
2019-08-28 19:27:20 +00:00
2019-04-17 19:09:15 +00:00
2019-09-03 17:52:06 +00:00
2013-02-12 13:17:49 -05:00
2014-12-08 22:22:58 +00:00
2019-09-08 17:28:20 +00:00
2016-09-14 16:39:47 +00:00
2016-05-02 13:43:18 +00:00
2013-02-12 13:17:49 -05:00
2013-02-12 13:17:49 -05:00
2013-03-15 15:24:13 -04:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2018-04-30 19:39:18 +00:00
2018-05-08 21:15:48 +00:00
2016-05-02 13:43:18 +00:00
2019-10-10 19:38:06 +00:00
2017-04-19 02:27:58 +00:00
2019-03-07 21:05:15 +00:00
2018-05-31 17:36:45 +00:00
2013-12-12 19:02:11 -08:00
2016-05-02 13:43:18 +00:00
2017-03-24 20:07:15 +00:00
2017-02-10 01:22:30 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2019-09-08 17:28:20 +00:00
2016-05-02 13:43:18 +00:00
2019-03-18 20:10:55 +00:00
2019-11-04 20:19:15 +00:00
2017-04-24 12:37:49 +00:00
2015-09-05 02:25:01 +00:00
2020-02-26 14:44:24 +00:00
2019-01-08 21:54:04 +00:00
2019-01-08 21:54:04 +00:00
2017-03-03 21:29:32 +00:00
2018-08-30 22:48:28 +00:00
2020-03-25 01:11:15 +00:00
2018-03-13 20:34:03 +00:00
2020-04-03 21:43:52 +00:00
2020-03-25 01:11:15 +00:00
2016-09-19 19:03:01 +00:00
2017-04-12 14:27:45 +00:00
2016-05-02 13:43:18 +00:00
2019-11-18 14:40:07 +00:00
2016-05-02 13:43:18 +00:00
2019-08-28 19:27:20 +00:00
2018-04-30 19:39:18 +00:00
2019-10-03 18:08:32 +00:00
2019-11-01 20:13:05 +00:00
2019-02-19 22:45:09 +00:00
2013-02-12 13:17:49 -05:00
2016-05-02 13:43:18 +00:00
2019-09-03 19:33:04 +00:00
2019-09-16 15:30:51 +00:00
2020-01-29 16:34:44 +00:00
2018-04-05 10:53:40 +00:00
2019-09-26 18:47:12 +00:00
2017-08-15 05:54:24 +00:00
2018-03-14 08:36:15 +00:00
2017-04-24 12:37:49 +00:00
2017-04-24 12:37:49 +00:00
2014-08-06 17:02:55 -04:00
2018-05-08 21:15:16 +00:00
2014-10-27 18:59:02 -04:00
2017-09-03 14:29:38 +00:00
2016-03-17 00:38:15 +00:00
2017-10-12 20:50:20 +00:00
2016-05-02 13:43:18 +00:00
2017-10-12 20:50:20 +00:00
2018-04-06 15:39:11 +00:00
2013-02-11 18:20:52 -05:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2013-02-12 13:17:49 -05:00
2016-05-02 13:43:18 +00:00
2019-05-11 03:02:33 +00:00
2018-11-26 14:13:53 +00:00
2016-05-02 13:43:18 +00:00
2018-11-27 15:36:08 +00:00
2018-11-26 14:13:53 +00:00
2018-11-26 14:13:53 +00:00
2018-11-26 14:13:53 +00:00
2018-11-26 14:13:53 +00:00
2020-01-25 16:30:26 +00:00
2016-10-15 17:58:14 +00:00
2018-12-05 21:54:54 +00:00
2018-11-02 19:53:59 +00:00
2020-04-03 21:43:52 +00:00
2016-10-25 22:28:40 +00:00
2019-09-08 17:28:20 +00:00
2018-04-30 19:39:18 +00:00
2016-09-13 20:06:13 +00:00
2018-05-31 17:36:45 +00:00
2017-09-26 04:08:38 +00:00
2018-05-31 17:36:45 +00:00
2020-02-26 13:11:53 +00:00
2017-09-12 05:50:54 +00:00
2018-03-03 19:52:00 +00:00
2016-05-02 13:43:18 +00:00
2019-09-03 20:41:29 +00:00
2016-05-02 13:43:18 +00:00
2018-01-10 01:35:45 +00:00
2017-04-24 12:37:49 +00:00
2016-05-02 13:43:18 +00:00
2016-03-11 21:19:20 +00:00
2016-03-11 21:19:20 +00:00
2016-03-11 21:19:20 +00:00
2016-03-11 22:07:02 +00:00
2019-09-06 23:15:48 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2017-02-11 21:46:21 +00:00
2018-03-01 21:11:16 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2020-03-25 14:19:25 +00:00
2016-05-02 13:43:18 +00:00
2017-03-01 01:06:32 +00:00
2019-09-06 23:15:48 +00:00
2016-05-02 13:43:18 +00:00
2018-05-31 17:36:45 +00:00
2019-11-18 14:40:07 +00:00
2018-12-03 16:48:21 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2018-03-08 22:25:25 +00:00
2018-10-03 19:54:29 +00:00
2018-10-03 19:54:16 +00:00
2018-10-03 19:54:16 +00:00
2018-06-12 19:10:34 +00:00
2019-09-08 17:28:20 +00:00
2013-12-12 17:17:02 -08:00
2016-05-02 13:43:18 +00:00
2016-08-19 01:10:21 +00:00
2013-03-15 00:35:09 -04:00
2018-10-16 21:54:35 +00:00
2017-02-02 17:36:43 +00:00
2017-05-19 18:11:51 +00:00
2013-03-15 00:35:09 -04:00
2015-11-03 18:57:18 +00:00
2014-07-01 09:20:51 +02:00
2014-01-03 21:03:20 +01:00
2015-09-06 23:50:51 +00:00
2019-09-11 23:33:11 +00:00
2019-10-28 23:34:13 +00:00
2018-10-04 00:49:49 +00:00
2019-11-05 00:26:30 +00:00
2019-11-05 00:26:30 +00:00
2016-07-06 20:48:41 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2020-03-22 08:42:38 +00:00
2019-03-18 21:16:19 +00:00
2016-12-23 17:35:24 +00:00