public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 00/28] rs6000: Auto-generate builtins from descriptions
@ 2020-06-17 19:46 Bill Schmidt
  2020-06-17 19:46 ` [PATCH 01/28] rs6000: Initial create of rs6000-gen-builtins.c Bill Schmidt
                   ` (29 more replies)
  0 siblings, 30 replies; 34+ messages in thread
From: Bill Schmidt @ 2020-06-17 19:46 UTC (permalink / raw)
  To: gcc-patches; +Cc: segher, dje.gcc, willschm

I posted a version of these patches back in stage 4 (February),
but we agreed that holding off until stage 1 was a better idea.
Since then I've made more progress and reorganized the patches
accordingly.  This group of patches lays groundwork, but does not
actually change GCC's behavior yet, other than to generate the
new initialization information and ignore it.

The current built-in support in the rs6000 back end requires at least
a master's degree in spelunking to comprehend.  It's full of cruft,
redundancy, and unused bits of code, and long overdue for a
replacement.  This is the first part of my project to do that.

My intent is to make adding new built-in functions as simple as adding
a few lines to a couple of files, and automatically generating as much
of the initialization, overload resolution, and expansion logic as
possible.  This patch series establishes the format of the input files
and creates a new program (rs6000-gen-builtins) to:

 * Parse the input files into an internal representation;
 * Generate a file of #defines (rs6000-vecdefines.h) for eventual
   inclusion into altivec.h; and
 * Generate an initialization file to create and initialize tables of
   built-in functions and overloads.

Patches 1, 3-7, and 9-19 contain the logic for rs6000-gen-builtins.
Patch 8 provides balanced tree search support for parsing scalability.
Patches 2 and 21-27 provide a first cut at the input files.
Patch 20 incorporates the new code into the GCC build.
Patch 28 adds comments to some existing files that will help
during the transition from the previous builtin mechanism.

The patch series is constructed so that any prefix set of the patches
can be upstreamed without breaking anything, so we can take the
reviews slowly.  There's still plenty of work left, but I think it
will be helpful to get this big chunk of patches upstream to make
further progress easier.

Thanks in advance for your reviews!


Bill Schmidt (28):
  rs6000: Initial create of rs6000-gen-builtins.c
  rs6000: Add initial input files
  rs6000: Add file support and functions for diagnostic support
  rs6000: Add helper functions for parsing
  rs6000: Add functions for matching types, part 1 of 3
  rs6000: Add functions for matching types, part 2 of 3
  rs6000: Add functions for matching types, part 3 of 3
  rs6000: Red-black tree implementation for balanced tree search
  rs6000: Main function with stubs for parsing and output
  rs6000: Parsing built-in input file, part 1 of 3
  rs6000: Parsing built-in input file, part 2 of 3
  rs6000: Parsing built-in input file, part 3 of 3
  rs6000: Parsing of overload input file
  rs6000: Build and store function type identifiers
  rs6000: Write output to the vector definition include file
  rs6000: Write output to the builtins header file
  rs6000: Write output to the builtins init file, part 1 of 3
  rs6000: Write output to the builtins init file, part 2 of 3
  rs6000: Write output to the builtins init file, part 3 of 3
  rs6000: Incorporate new builtins code into the build machinery
  rs6000: Add remaining MASK_ALTIVEC builtins
  rs6000: Add MASK_VSX builtins
  rs6000: Add available-everywhere and ancient builtins
  rs6000: Add Power7 builtins
  rs6000: Add MASK_P8_VECTOR builtins
  rs6000: Add MASK_P9_VECTOR and MASK_P9_MISC builtins
  rs6000: Add remaining builtins
  rs6000: Add comments to help with transition

 gcc/config.gcc                           |    3 +-
 gcc/config/rs6000/rbtree.c               |  233 ++
 gcc/config/rs6000/rbtree.h               |   51 +
 gcc/config/rs6000/rs6000-builtin-new.def | 2965 ++++++++++++++++++++++
 gcc/config/rs6000/rs6000-builtin.def     |   15 +
 gcc/config/rs6000/rs6000-call.c          |  166 ++
 gcc/config/rs6000/rs6000-gen-builtins.c  | 2586 +++++++++++++++++++
 gcc/config/rs6000/rs6000-overload.def    |   57 +
 gcc/config/rs6000/t-rs6000               |   25 +-
 9 files changed, 6099 insertions(+), 2 deletions(-)
 create mode 100644 gcc/config/rs6000/rbtree.c
 create mode 100644 gcc/config/rs6000/rbtree.h
 create mode 100644 gcc/config/rs6000/rs6000-builtin-new.def
 create mode 100644 gcc/config/rs6000/rs6000-gen-builtins.c
 create mode 100644 gcc/config/rs6000/rs6000-overload.def

-- 
2.17.1


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

end of thread, other threads:[~2020-07-01 14:47 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-17 19:46 [PATCH 00/28] rs6000: Auto-generate builtins from descriptions Bill Schmidt
2020-06-17 19:46 ` [PATCH 01/28] rs6000: Initial create of rs6000-gen-builtins.c Bill Schmidt
2020-06-17 19:46 ` [PATCH 02/28] rs6000: Add initial input files Bill Schmidt
2020-06-17 19:46 ` [PATCH 03/28] rs6000: Add file support and functions for diagnostic support Bill Schmidt
2020-06-17 19:46 ` [PATCH 04/28] rs6000: Add helper functions for parsing Bill Schmidt
2020-06-17 19:46 ` [PATCH 05/28] rs6000: Add functions for matching types, part 1 of 3 Bill Schmidt
2020-06-17 19:46 ` [PATCH 06/28] rs6000: Add functions for matching types, part 2 " Bill Schmidt
2020-06-17 19:46 ` [PATCH 07/28] rs6000: Add functions for matching types, part 3 " Bill Schmidt
2020-06-17 19:46 ` [PATCH 08/28] rs6000: Red-black tree implementation for balanced tree search Bill Schmidt
2020-06-17 19:46 ` [PATCH 09/28] rs6000: Main function with stubs for parsing and output Bill Schmidt
2020-06-17 19:46 ` [PATCH 10/28] rs6000: Parsing built-in input file, part 1 of 3 Bill Schmidt
2020-06-17 19:46 ` [PATCH 11/28] rs6000: Parsing built-in input file, part 2 " Bill Schmidt
2020-06-17 19:46 ` [PATCH 12/28] rs6000: Parsing built-in input file, part 3 " Bill Schmidt
2020-06-17 19:46 ` [PATCH 13/28] rs6000: Parsing of overload input file Bill Schmidt
2020-06-17 19:46 ` [PATCH 14/28] rs6000: Build and store function type identifiers Bill Schmidt
2020-06-17 19:46 ` [PATCH 15/28] rs6000: Write output to the vector definition include file Bill Schmidt
2020-06-17 19:46 ` [PATCH 16/28] rs6000: Write output to the builtins header file Bill Schmidt
2020-06-17 19:46 ` [PATCH 17/28] rs6000: Write output to the builtins init file, part 1 of 3 Bill Schmidt
2020-06-17 19:46 ` [PATCH 18/28] rs6000: Write output to the builtins init file, part 2 " Bill Schmidt
2020-06-17 19:46 ` [PATCH 19/28] rs6000: Write output to the builtins init file, part 3 " Bill Schmidt
2020-06-17 19:46 ` [PATCH 20/28] rs6000: Incorporate new builtins code into the build machinery Bill Schmidt
2020-06-17 19:46 ` [PATCH 21/28] rs6000: Add remaining MASK_ALTIVEC builtins Bill Schmidt
2020-06-17 19:46 ` [PATCH 22/28] rs6000: Add MASK_VSX builtins Bill Schmidt
2020-06-17 19:46 ` [PATCH 23/28] rs6000: Add available-everywhere and ancient builtins Bill Schmidt
2020-06-17 19:46 ` [PATCH 24/28] rs6000: Add Power7 builtins Bill Schmidt
2020-06-17 19:46 ` [PATCH 25/28] rs6000: Add MASK_P8_VECTOR builtins Bill Schmidt
2020-06-17 19:46 ` [PATCH 26/28] rs6000: Add MASK_P9_VECTOR and MASK_P9_MISC builtins Bill Schmidt
2020-06-17 19:46 ` [PATCH 27/28] rs6000: Add remaining builtins Bill Schmidt
2020-06-17 19:46 ` [PATCH 28/28] rs6000: Add comments to help with transition Bill Schmidt
2020-06-18 16:08 ` [PATCH 00/28] rs6000: Auto-generate builtins from descriptions will schmidt
2020-06-18 22:01   ` Bill Schmidt
2020-06-18 22:48     ` will schmidt
2020-06-23 20:21       ` Bill Schmidt
2020-07-01 14:47 ` Bill Schmidt

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).