Hi Segher,
On 8/26/21 6:15 PM, Segher Boessenkool wrote:
Hi!
On Thu, Jul 29, 2021 at 08:31:02AM -0500, Bill Schmidt wrote:
* config/rs6000/rs6000-call.c (rs6000-builtins.h): New #include.
(rs6000_init_builtins): Call rs6000_autoinit_builtins; skip the old
initialization logic when new builtins are enabled.
s/; s/. S/
+ /* Execute the autogenerated initialization code for builtins. */
+ rs6000_autoinit_builtins ();
The name "autoinit" isn't so great (what "self" does this "auto" refer
to?), but perhaps some later patch fixes this up? It is minor of
course, but the bigger something is, the better name that it deserves.
Names shape thoughts, and we should make the architecture of our code as
clear as possible.
Well, "autoinit" was meant to mean "automated initialization." But I
take your point. What would you say to "rs6000_init_generated_builtins"?
+#ifdef SUBTARGET_INIT_BUILTINS
+ SUBTARGET_INIT_BUILTINS;
+#endif
Let's see how this shapes up. Preferably we won't have an #ifdef but
an empty macro (or a "do {} while (0)"), etc.
To be clear, this isn't new code. It's just the only part of the old
code that isn't replaced by the generated initialization. You'll see it
repeated at the end of rs6000_init_builtins. This is used on our port
for adding one builtin from Darwin. It's a standard macro, also used in
the aarch64, i386, and netbsd ports.
Okay for trunk, if this is revisited later. Thanks!
Thanks for the review! I'll commit after we agree on a name. (This will
require minor changes to rs6000-gen-builtins.c to change the name of the
generated function in rs6000-builtins.[ch].)
Bill
Segher