This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA:] Rename define_mode_macro to define_mode_iterator, ditto define_code_*


Hans-Peter Nilsson <hans-peter.nilsson@axis.com> writes:
> Richard Sandiford, the author of this machinery, kindly asked
> that I do the legwork to rename these things.  Ok, not exactly,
> but he suggested in off-list email that I go ahead and rename it
> since I've complained about the name "many times" (though I
> can't find more than about five occasions - I've even forgot
> whether I've said it on the list before!)

Hey, well, five occassions does seem a lot of times to make the same
complaint. ;)  I think I read all five...

For the gcc-patches record, I didn't volunteer myself because I didn't
really have an issue with the old name.  Nor do I with the one, so
thanks a bunch for doing this.

> There may be an alternate approach in which only the documentation
> is changed and where read-rtl.c changed to accept
> define_mode_iterator and define_code_iterator as synonyms to the
> macro names but I didn't think of that until I'd done the work,
> and it'd seem a bit inconsistent anyway.

Right.  I agree that a wholesale rename is better.

> The actual ports change was indeed very mechanical, though I
> separately inspected code to change "macro" into "iterator" in
> comments, fixing grammar and such and to adjust indentation.  I
> cross-tested cris-axis-elf and mmix-knuth-mmixware (though the
> latter has no iterators) with no regressions, and built and
> inspected the generated files (obj/gcc/*.{[hc],md}) from "make
> all-gcc" for all targets with iterators, alpha-unknown-linux-gnu
> arm-elf bfin-elf crx-elf frv-elf ia64-elf m32c-elf m68k-elf
> mips-elf powerpc-eabisim s390-unknown-linux-gnu-elf spu-elf
> vax-unknown-netbsdelf xtensa-elf sparc-elf and similar for the
> partial build (bootstrap broken at the time) of native x86_64 to
> check that those files were identical.

Thanks for all the testing.  I must admit I hadn't thought about
the hassle of having to update the comments; that is indeed less
mechanical than I'd made out.

Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]