This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 0/6] Conversion of gimple types to C++ inheritance (v3)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Andrew MacLeod <amacleod at redhat dot com>
- Cc: David Malcolm <dmalcolm at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 1 Nov 2013 22:41:48 +0100
- Subject: Re: [PATCH 0/6] Conversion of gimple types to C++ inheritance (v3)
- Authentication-results: sourceware.org; auth=none
- References: <5271CBF9 dot 2070005 at redhat dot com> <1383236801-13234-1-git-send-email-dmalcolm at redhat dot com> <52741EE2 dot 3030100 at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Nov 01, 2013 at 05:36:34PM -0400, Andrew MacLeod wrote:
> static inline void
> ! gimple_call_set_lhs (gimple gs, tree lhs)
> {
> - GIMPLE_CHECK (gs, GIMPLE_CALL);
> gimple_set_op (gs, 0, lhs);
> to
> static inline void
> ! gimple_call_set_lhs (gimple_statement_call *gs, tree lhs)
> {
> gimple_set_op (gs, 0, lhs);
>
>
> but then every location that calls it needs an appropriate change:
>
> ! gimple call;
> ! call = gimple_build_call_vec (build_fold_addr_expr_loc (0,
> alias), vargs);
> gimple_call_set_lhs (call, atree);
>
> --- 1518,1524 ----
>
> ! gimple_statement_call *call;
> ! call = as_a<gimple_statement_call> (gimple_build_call_vec
> (build_fold_addr_expr_loc (0, alias), vargs));
> gimple_call_set_lhs (call, atree);
>
> And in fact there is a ripple effect to then change
> gimple_build_call_vec to simply return a gimple_statement_call *...
> Then this doesn't look as ugly either...
>
> ! gimple_statement_call *call;
> ! call = gimple_build_call_vec (build_fold_addr_expr_loc (0,
> alias), vargs);
> gimple_call_set_lhs (call, atree);
>
> that is looking much better :-)
Do you seriously think this is an improvement? The cost of changing
the --enable-checking=yes cost to compile time checking in either
cases sounds way too high to me. Please don't.
Jakub