Re: [PATCH] read-md.c: Move various state to within class rtx_reader (v3)

2016-10-17 Thread Richard Sandiford
David Malcolm writes: >> I assume you didn't turn the functions above into member functions >> because they aren't primitives. OTOH it might seem inconsistent >> to have things like traverse_enum_types as member functions but >> traverse_md_constants not. > > In the

[PATCH] read-md.c: Move various state to within class rtx_reader (v3)

2016-10-17 Thread David Malcolm
On Mon, 2016-10-17 at 12:37 +0100, Richard Sandiford wrote: > David Malcolm writes: > > @@ -2388,8 +2389,10 @@ gen_mnemonic_setattr (htab_t mnemonic_htab, > > rtx insn) > > static int > > mnemonic_htab_callback (void **slot, void *info ATTRIBUTE_UNUSED) > > { > > -

Re: [PATCH] read-md.c: Move various state to within class rtx_reader

2016-10-17 Thread Richard Sandiford
David Malcolm writes: > @@ -2388,8 +2389,10 @@ gen_mnemonic_setattr (htab_t mnemonic_htab, rtx insn) > static int > mnemonic_htab_callback (void **slot, void *info ATTRIBUTE_UNUSED) > { > - obstack_grow (_obstack, (char*)*slot, strlen ((char*)*slot)); > - obstack_1grow

Re: [PATCH] read-md.c: Move various state to within class rtx_reader

2016-10-17 Thread Bernd Schmidt
On 10/14/2016 08:16 PM, David Malcolm wrote: In this version of the patch, I've moved the global variables to be fields of class rtx_reader, moving their setup to the constructor. The patch adds matching cleanups to the destructor, along with a cleanup of m_base_dir. Doing so requires updating

[PATCH] read-md.c: Move various state to within class rtx_reader

2016-10-14 Thread David Malcolm
On Wed, 2016-10-12 at 22:57 +0100, Richard Sandiford wrote: > Sorry, haven't had time to read the full series yet, but: > > David Malcolm writes: > > On Wed, 2016-10-05 at 17:51 +0200, Bernd Schmidt wrote: > > > On 10/05/2016 06:14 PM, David Malcolm wrote: > > > > The