This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: revised PATCH: CALL_EXPR representation changes, part 2/9 (builtins.c and fold-const.c)
- From: Ian Lance Taylor <iant at google dot com>
- To: Sandra Loosemore <sandra at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Brooks Moses <brooks dot moses at codesourcery dot com>, Lee Millward <lee dot millward at codesourcery dot com>
- Date: 15 Feb 2007 10:31:35 -0800
- Subject: Re: revised PATCH: CALL_EXPR representation changes, part 2/9 (builtins.c and fold-const.c)
- References: <45D349B7.5040701@codesourcery.com>
Sandra Loosemore <sandra@codesourcery.com> writes:
> *************** fold_ternary (enum tree_code code, tree
> *** 12018,12028 ****
> return NULL_TREE;
>
> case CALL_EXPR:
> ! /* Check for a built-in function. */
> ! if (TREE_CODE (op0) == ADDR_EXPR
> ! && TREE_CODE (TREE_OPERAND (op0, 0)) == FUNCTION_DECL
> ! && DECL_BUILT_IN (TREE_OPERAND (op0, 0)))
> ! return fold_builtin (TREE_OPERAND (op0, 0), op1, false);
> return NULL_TREE;
>
> case BIT_FIELD_REF:
> --- 11990,11996 ----
> return NULL_TREE;
>
> case CALL_EXPR:
> ! /* Handled separately for now. */
> return NULL_TREE;
I think this should be gcc_unreachable ().
> *** 12225,12230 ****
> --- 12205,12213 ----
> TYPE_CACHED_VALUES (expr) = NULL;
> }
> }
> + else if (TREE_CODE_CLASS (code) == tcc_gimple_stmt)
> + /* Skip expressions without type information. */
> + return;
> md5_process_bytes (expr, tree_size (expr), ctx);
> fold_checksum_tree (TREE_TYPE (expr), ctx, ht);
> if (TREE_CODE_CLASS (code) != tcc_type
Please don't check this in with your other changes. This is a
separate issue which should be handled separately.
This patch is OK with those changes.
Please watch out for bugs related to the changes to builtins.c. I
didn't have the energy to verify every change to that file.
Thanks.
Ian