This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Reformatting and minor code changes for dwarf2out.c
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: jason at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 26 Dec 01 20:15:32 EST
- Subject: Re: Reformatting and minor code changes for dwarf2out.c
Speaking as the dwarf2out maintainer, I agree with Richard.
Umm... we're both "Richard".
I very seldom think that abstraction makes the code harder to read.
It doesn't if it's carried through. Here we had exactly *one*
abstract operation, used exactly once. That was more "abstraction for
the sake of abstraction". Moreover, that one usage is *explicitly*
deadling with incomplete types, unlike when the purpose of the code is
to do something else and you want to abstract away some sub-operation.
The same goes for save_rtl, which you removed in a previous patch.
That one I realized afterwards would probably have been better to just
change to take the rtx as a parameter and return void. With GC, it
didn't make an sense any more as a function returning rtl since a
caller tends to want to know sometimes whether an rtl has been
modified or not. This one is a case where indeed the abstraction of a
sub-operation makes more sense. But I don't think it's worth putting
back at this point unless you do.