public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/7] Support vector load/store with length
@ 2020-05-26  5:49 Kewen.Lin
  2020-05-26  5:51 ` [PATCH 1/7] ifn/optabs: " Kewen.Lin
                   ` (7 more replies)
  0 siblings, 8 replies; 80+ messages in thread
From: Kewen.Lin @ 2020-05-26  5:49 UTC (permalink / raw)
  To: GCC Patches
  Cc: Bill Schmidt, Segher Boessenkool, Richard Sandiford,
	Richard Guenther, dje.gcc

Hi all,

This patch set adds support for vector load/store with length, Power 
ISA 3.0 brings instructions lxvl/stxvl to perform vector load/store with
length, it's good to be exploited for those cases we don't have enough
stuffs to fill in the whole vector like epilogues.

This support mainly refers to the handlings for fully-predicated loop
but it also covers the epilogue usage.  Now it supports two modes
controlled by parameter vect-with-length-scope, it can support any
loops fully with length or just for those cases with small iteration
counts less than VF like epilogue, for now I don't have ready env to
benchmark it, but based on the current inefficient length generation,
I don't think it's a good idea to adopt vector with length for any loops.
For the main loop which used to be vectorized, it increases register
pressure and introduces extra computation for length, the pro for icache
seems not comparable.  But I think it might be a good idea to keep this
parameter there for functionality testing, further benchmarking and other
ports' potential future supports.

As we don't have any benchmarking, this support isn't enabled by default
for any particular cpus, all testings are with explicit parameter setting.

Bootstrapped on powerpc64le-linux-gnu P9 with all vect-with-length-scope
settings (0/1/2).  Regress-test passed with vector-with-length-scope 0,
for the other twos, several vector related cases need to be updated, no
remarkable failures found.  BTW, P9 is the one which supports the
functionality but not ready to evaluate the performance.

Here still are many things to be supported or improved, not limited to:
  - reduction/live-out support
  - Cost model adding/tweaking
  - IFN gimple folding
  - Some unnecessary ops improvements eg: vector_size check
  - Some possible refactoring
I'll support/post the patches gradually.

Any comments are highly appreciated.

BR,
Kewen
-----

Patch set outline:
  [PATCH 1/7] ifn/optabs: Support vector load/store with length
  [PATCH 2/7] rs6000: lenload/lenstore optab support
  [PATCH 3/7] vect: Factor out codes for niters smaller than vf check
  [PATCH 4/7] hook/rs6000: Add vectorize length mode for vector with length
  [PATCH 5/7] vect: Support vector load/store with length in vectorizer
  [PATCH 6/7] ivopts: Add handlings for vector with length IFNs
  [PATCH 7/7] rs6000/testsuite: Vector with length test cases

 gcc/config/rs6000/rs6000.c                                  |   3 +
 gcc/config/rs6000/vsx.md                                    |  30 ++++++++++
 gcc/doc/invoke.texi                                         |   7 +++
 gcc/doc/md.texi                                             |  16 ++++++
 gcc/doc/tm.texi                                             |   6 ++
 gcc/doc/tm.texi.in                                          |   2 +
 gcc/internal-fn.c                                           |  13 ++++-
 gcc/internal-fn.def                                         |   6 ++
 gcc/optabs.def                                              |   2 +
 gcc/params.opt                                              |   4 ++
 gcc/target.def                                              |   7 +++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-1.h          |  18 ++++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-2.h          |  17 ++++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-3.h          |  31 +++++++++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-4.h          |  24 ++++++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-5.h          |  29 ++++++++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-6.h          |  32 +++++++++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-epil-1.c     |  15 +++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-epil-2.c     |  15 +++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-epil-3.c     |  18 ++++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-epil-4.c     |  15 +++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-epil-5.c     |  15 +++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-epil-6.c     |  16 ++++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-epil-run-1.c |  10 ++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-epil-run-2.c |  10 ++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-epil-run-3.c |  10 ++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-epil-run-4.c |  10 ++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-epil-run-5.c |  10 ++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-epil-run-6.c |  10 ++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-full-1.c     |  16 ++++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-full-2.c     |  16 ++++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-full-3.c     |  17 ++++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-full-4.c     |  16 ++++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-full-5.c     |  16 ++++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-full-6.c     |  16 ++++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-full-run-1.c |  10 ++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-full-run-2.c |  10 ++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-full-run-3.c |  10 ++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-full-run-4.c |  10 ++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-full-run-5.c |  10 ++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-full-run-6.c |  10 ++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-run-1.h      |  34 ++++++++++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-run-2.h      |  36 ++++++++++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-run-3.h      |  34 ++++++++++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-run-4.h      |  62 +++++++++++++++++++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-run-5.h      |  45 +++++++++++++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length-run-6.h      |  52 +++++++++++++++++
 gcc/testsuite/gcc.target/powerpc/p9-vec-length.h            |  14 +++++
 gcc/tree-ssa-loop-ivopts.c                                  |   4 ++
 gcc/tree-vect-loop-manip.c                                  | 268 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 gcc/tree-vect-loop.c                                        | 272 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 gcc/tree-vect-stmts.c                                       | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++
 gcc/tree-vectorizer.h                                       |  32 +++++++++++
 53 files changed, 1545 insertions(+), 18 deletions(-)

^ permalink raw reply	[flat|nested] 80+ messages in thread

end of thread, other threads:[~2020-07-22 12:51 UTC | newest]

Thread overview: 80+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-26  5:49 [PATCH 0/7] Support vector load/store with length Kewen.Lin
2020-05-26  5:51 ` [PATCH 1/7] ifn/optabs: " Kewen.Lin
2020-06-10  6:41   ` [PATCH 1/7 V2] " Kewen.Lin
2020-06-10  9:22     ` Richard Sandiford
2020-06-10 12:36       ` [PATCH 1/7 V3] " Kewen.Lin
2020-06-22  8:51         ` [PATCH 1/7 V4] " Kewen.Lin
2020-06-22 19:59           ` Richard Sandiford
2020-06-22 22:19             ` Segher Boessenkool
2020-06-23  3:54             ` [PATCH 1/7 v5] " Kewen.Lin
2020-06-23  9:52               ` Richard Sandiford
2020-06-23 11:25                 ` Richard Biener
2020-06-23 12:20                   ` Richard Sandiford
2020-06-24  2:40                     ` Jim Wilson
2020-06-24  7:34                       ` Richard Sandiford
2020-06-29  6:32                         ` [PATCH 1/7 v6] " Kewen.Lin
2020-06-29 10:07                           ` Richard Sandiford
2020-06-29 10:39                             ` [PATCH 1/7 v7] " Kewen.Lin
2020-06-30 15:32                               ` Richard Sandiford
2020-07-01 13:35                                 ` [PATCH 1/7 v8] " Kewen.Lin
2020-07-07  9:24                                   ` Richard Sandiford
2020-06-24 23:56                     ` [PATCH 1/7 v5] " Segher Boessenkool
2020-06-23  6:47             ` [PATCH 1/7 V4] " Richard Biener
2020-05-26  5:53 ` [PATCH 2/7] rs6000: lenload/lenstore optab support Kewen.Lin
2020-06-10  6:43   ` [PATCH 2/7 V2] " Kewen.Lin
2020-06-10 12:39     ` [PATCH 2/7 V3] " Kewen.Lin
2020-06-11 22:55       ` Segher Boessenkool
2020-06-12  3:02         ` Kewen.Lin
2020-06-23  3:58       ` [PATCH 2/7 v4] " Kewen.Lin
2020-06-29  6:32         ` [PATCH 2/7 v5] " Kewen.Lin
2020-06-29 17:57           ` Segher Boessenkool
2020-05-26  5:54 ` [PATCH 3/7] vect: Factor out codes for niters smaller than vf check Kewen.Lin
2020-05-26  5:55 ` [PATCH 4/7] hook/rs6000: Add vectorize length mode for vector with length Kewen.Lin
2020-06-10  6:44   ` [PATCH 4/7 V2] " Kewen.Lin
2020-05-26  5:57 ` [PATCH 5/7] vect: Support vector load/store with length in vectorizer Kewen.Lin
2020-05-26 12:49   ` Richard Sandiford
2020-05-26 12:52     ` Richard Sandiford
2020-05-27  8:25     ` Kewen.Lin
2020-05-27 10:02       ` Richard Sandiford
2020-05-28  1:21         ` Kewen.Lin
2020-05-29  8:32           ` Richard Sandiford
2020-05-29 12:38             ` Segher Boessenkool
2020-06-02  9:03             ` [PATCH 5/7 v3] " Kewen.Lin
2020-06-02 11:50               ` Richard Sandiford
2020-06-02 17:01                 ` Segher Boessenkool
2020-06-03  6:33                 ` Kewen.Lin
2020-06-10  9:19                   ` [PATCH 5/7 v4] " Kewen.Lin
2020-06-22  8:33                     ` [PATCH 5/7 v5] " Kewen.Lin
2020-06-29  6:33                       ` [PATCH 5/7 v6] " Kewen.Lin
2020-06-30 19:53                         ` Richard Sandiford
2020-07-01 13:23                           ` Kewen.Lin
2020-07-01 15:17                             ` Richard Sandiford
2020-07-02  5:20                               ` Kewen.Lin
2020-07-07  9:26                                 ` Kewen.Lin
2020-07-07 10:44                                   ` Richard Sandiford
2020-07-08  6:52                                     ` Kewen.Lin
2020-07-08 12:50                                       ` Richard Sandiford
2020-07-10  7:40                                         ` Kewen.Lin
2020-07-07 10:15                                 ` Richard Sandiford
2020-07-08  7:01                                   ` Kewen.Lin
2020-07-10  9:55                           ` [PATCH 5/7 v7] " Kewen.Lin
2020-07-17  9:54                             ` Richard Sandiford
2020-07-20  2:25                               ` Kewen.Lin
2020-05-26  5:58 ` [PATCH 6/7] ivopts: Add handlings for vector with length IFNs Kewen.Lin
2020-07-22 12:51   ` Richard Sandiford
2020-05-26  5:59 ` [PATCH 7/7] rs6000/testsuite: Vector with length test cases Kewen.Lin
2020-07-10 10:07   ` [PATCH 7/7 v2] " Kewen.Lin
2020-07-20 16:58     ` Segher Boessenkool
2020-07-21  2:53       ` Kewen.Lin
2020-05-26  7:12 ` [PATCH 0/7] Support vector load/store with length Richard Biener
2020-05-26  8:51   ` Kewen.Lin
2020-05-26  9:44     ` Richard Biener
2020-05-26 10:10       ` Kewen.Lin
2020-05-26 12:29         ` Richard Sandiford
2020-05-27  0:09           ` Segher Boessenkool
2020-05-27  7:25             ` Richard Biener
2020-05-27  8:50               ` Kewen.Lin
2020-05-27 14:08               ` Segher Boessenkool
2020-05-26 22:34   ` Jim Wilson
2020-05-27  7:21     ` Richard Biener
2020-05-27  7:46       ` Richard Sandiford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).