This is the mail archive of the
mailing list for the GCC project.
Re: Re-factor tree.h - Part 1
- From: Diego Novillo <dnovillo at google dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Andrew Macleod <amacleod at redhat dot com>
- Date: Wed, 6 Nov 2013 12:11:03 -0500
- Subject: Re: Re-factor tree.h - Part 1
- Authentication-results: sourceware.org; auth=none
- References: <20131106032236 dot GA20349 at google dot com> <alpine dot DEB dot 2 dot 10 dot 1311060751520 dot 4174 at laptop-mg dot saclay dot inria dot fr> <527A7463 dot 3020507 at redhat dot com>
On Wed, Nov 6, 2013 at 11:54 AM, Jeff Law <firstname.lastname@example.org> wrote:
> On 11/06/13 00:04, Marc Glisse wrote:
>> On Tue, 5 Nov 2013, Diego Novillo wrote:
>>> This is the first patch in a series of patches to cleanup tree.h to
>>> reduce the exposure it has all over the compiler.
>>> In this patch, I'm moving functions that are used once into the files
>>> that use them, and make them private to that file. These functions
>>> were declared extern in tree.h and called from exactly one place.
>> I am not a big fan of doing it so automatically. For instance
>> widest_int_cst_value should imho remain next to int_cst_value since they
>> mostly share the same implementation. Doing this also doesn't promote
>> code reuse: if I am looking for a function that does some basic
>> operation on trees, I won't only need to look in the file that is
>> semantically relevant, I'll also need to randomly grep through possible
>> users to see if I should revert that part of your patch. On the other
>> hand, most of those functions you move probably are better off in their
>> new location, so you can ignore my post.
> What I think makes sense is to review what moved and where/why. I suspect
> (but have not looked) that much of the movement of code makes sense. Where
> it doesn't, then obviously we shouldn't make that change.
Ah, yes. I just sent this list. Perhaps that's easier to discuss
than the patch, which looks like line noise.