Ian Lance Taylor - Re: PATCH: CALL_EXPR representation part 1/9 (tree changes + documentati (original) (raw)

This is the mail archive of the gcc-patches@gcc.gnu.orgmailing 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]

Sandra Loosemore sandra@codesourcery.com writes:

The comment should explicitly say that the operand length includes the length operand itself. That is, the minimum valid length is 1.

/* In ordinary expression nodes. */

Do you have any timings of the compiler with your patch? When checking is enabled this is going to add a lot of function calls. I would like to see tree_operand_length be a static inline function in tree.h, unless there is some reason not to do that.

These macros should all check that they are being applied to a CALL_EXPR node. Please change these to use the existing CALL_EXPR_CHECK macro. We may have other variable length tree codes in the future, so checking VL_EXP_CHECK is not what we need here.

Please put spaces around the '+' in CALL_EXPR_ARG.

This should also use CALL_EXPR_CHECK.

The names and current implementations of these functions imply that they only build CALL_EXPRs. In that case, they don't need to take a tree_code parameter. I'd like these to be reworked so that either build general tcc_vl_exp nodes, or they just build CALL_EXPR nodes.

Here too: build a CALL_EXPR (and don't take a tree_code parameter), or build a general list (and change the name of the function).

*************** substitute_in_expr (tree exp, tree f, tr *** 2472,2477 **** --- 2502,2528 ---- } break;

The loop over the operands can start at 1, since operand 0 is known to be the length.

*************** substitute_placeholder_in_expr (tree exp *** 2602,2607 **** --- 2655,2682 ---- } break;

Here also.

*************** build_omp_clause (enum omp_clause_code c *** 7305,7310 **** --- 7396,7554 ---- return t; }

Here also.

This function is named process_call_operands, so you don't need to check for CALL_EXPR. Or, if you want to handle other node types either, you should give the function a different name.

Please add spaces around the '-'.

Do you still need this function? It's fine if you do need it.

Sorry for all the requested changes. I think they should be fairly mechanical. Send another version of this patch when they are done.

Thanks.

Ian


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