This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Gimplify result of ccp_fold_builtin if not already gimple
- From: Richard Henderson <rth at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 20 Sep 2004 21:44:49 -0700
- Subject: Re: [PATCH] Gimplify result of ccp_fold_builtin if not already gimple
- References: <20040920224420.GJ31909@devserv.devel.redhat.com>
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~