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] Gimplify result of ccp_fold_builtin if not already gimple


On Mon, Sep 20, 2004 at 06:44:20PM -0400, Jakub Jelinek wrote:
> +  gimplify_stmt (&stmt);

You want gimplify_to_stmt_list, because you're relying on that...

> +  for (ti = tsi_start (stmt); !tsi_end_p (ti); tsi_next (&ti))

... here.

But, given that you're recording all new temporaries by hand anyway,
it might be best to just use get_initialized_tmp_var instead of
make_rename_temp and building your own MODIFY_EXPR.

> +  bsi_insert_before (si_p, stmt, BSI_SAME_STMT);

You'll want to set EXPR_LOCATION, as in sra_insert_before.

> +	  if (!set_rhs (stmtp, result))

Although really set_rhs is not a particularly good check for whether
or not the substitution is valid.  I wonder if we shouldn't force the
substitution and then re-gimplify the whole statement.


r~


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