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: [tuples] [patch] refactoring of tree_expr_nonzero_warnv_p


On Tue, Mar 4, 2008 at 1:47 PM, Diego Novillo <dnovillo@google.com> wrote:
> On 3/4/08 5:38 AM, Richard Guenther wrote:
>
>  > Please use context diffs when posting patches, and do them inline
>  > rather than with attachments.  Thanks.
>
>  Ironically, I'd rather have attached unified diffs.  I guess it's a
>  matter of taste.

Well, unified diffs usually "optimize" for size and so get removes/adds
of different functions cluttered all over the place which makes the patch
hard to follow.  So I prefer context diffs.

>  > I find the _expr bits in the function names redundant,
>  > tree_unary_nonzero_warnv_p is shorter and as explicit.  It also
>  > matches
>  > fold_unary and friends.
>
>  Yeah, that's probably a good idea.
>
>
>  > IMHO all this mixing of GIMPLE concepts inside fold-const.c is ugly,
>  > can't we just cp fold-const.c gimple-fold-const.c and only fix the duplicate?
>  > (Yeah, I hope we can trim down both sides and finally get the FEs only
>  > fold what they really need).
>
>  Yes, but the gimple counterparts will need the basic functionality in
>  fold-const.c.  There will be a gimple-fold.c soon.  We are implementing
>  GIMPLE folders in terms of public functions in fold-const.c, which is
>  shared by the FEs and the ME.

Ok.

>  So, in this case I propose moving the tree_*_nonzero_warnv_p() functions
>  to fold-const.c and gimple_nonzero_warnv_p() in gimple-fold.c.
>  Similarly, for other functions that we have in tree-ssa-ccp.c and
>  tree-ssa.c.  Thoughts?

Sounds like a good plan.  Maybe also separate constant foldings
(that would be also used by FEs directly) to a const-fold.c.  But that's
of course unrelated to your work here.

Richard.


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