Hi! On Fri, Feb 14, 2020 at 10:34:40AM -0800, Mike Stump wrote: > On Feb 4, 2020, at 9:40 AM, Segher Boessenkool <seg...@kernel.crashing.org> > wrote: > >> 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-genbif) to: > > > > Let's call it rs6000-gen-builtins or similar. Not as cryptic. > > Or, config/gen-builtins. :-)
As explained before, to get somewhere in a reasonable time, we first need to do it for rs6000 only. This patchset is solving an acute problem for us, too, that is the *purpose* of it. It remains to be seen how much of it can be used by other targets. Pretending something is generic while it in fact is just a mass of special cases isn't useful, it's just costly. > Indeed, some of the older gcc port interfaces, for example, registers > (FIXED_REGISTERS, CALL_REALLY_USED_REGISTERS, REG_ALLOC_ORDER, > HARD_REGNO_CALLER_SAVE_MODE, REG_CLASS_NAMES, REG_CLASS_CONTENTS, > REGISTER_NAMES), I think would be a nice area for a generator as well. Every > port has registers, and yet, those interfaces are too clunky. Yes... Like, last year I renumbered the rs6000 registers. Things have to be changed in a bunch of tables, but also in a few other places that you cannot generate the code for. So on one hand a generator for this certainly would have helped, but on the other hand, it isn't the holy grail you might be after either. > Just wanted to say, I like your plan. :-) It'll be a lot of work still, let's hope we can make it for GCC 11. Segher