On 5/16/25 11:22 AM, Richard Sandiford wrote:
gen_exp now has quite a few arguments that need to be passed
to each recursive call. This patch turns it and related routines
into member functions of a new generator class, so that the shared
information can be stored in member variables.
This also helps to make later patches less noisy.
gcc/
* genemit.cc (generator): New structure.
(gen_rtx_scratch, gen_exp, gen_emit_seq): Turn into member
functions of generator.
(gen_insn, gen_expand, gen_split, output_add_clobbers): Update
users accordingly.
OK. And thanks for doing this. Too many function arguments is one of
those signs that some C++-ification may be helpful. IT's not the only
factor, but one that's pretty consistently led to simpler code in the end.
jeff