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: [PATCH 0/6] Conversion of gimple types to C++ inheritance (v3)


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


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