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: revised PATCH: CALL_EXPR representation changes, part 2/9 (builtins.c and fold-const.c)


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


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