This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] make data dependence analyzer more strict
Daniel Berlin wrote:
> My only comment is that your code should check call_expr_flags (call) &
> (ECF_PURE | ECF_CONST)
>
Here is the change:
/* ASM_EXPR and CALL_EXPR may embed arbitrary side effects.
Calls have side-effects, except those to const or pure
functions. */
if (dont_know_node_not_inserted
&& ((TREE_CODE (stmt) == CALL_EXPR
&& !(call_expr_flags (stmt) & (ECF_CONST | ECF_PURE)))
|| TREE_CODE (stmt) == ASM_EXPR))
goto insert_dont_know_node;