[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 09/48] tcg/optimize: Drop nb_oargs, nb_iargs locals
From: |
Alex Bennée |
Subject: |
Re: [PATCH v2 09/48] tcg/optimize: Drop nb_oargs, nb_iargs locals |
Date: |
Wed, 20 Oct 2021 17:17:47 +0100 |
User-agent: |
mu4e 1.7.0; emacs 28.0.60 |
Richard Henderson <richard.henderson@linaro.org> writes:
> Rather than try to keep these up-to-date across folding,
> re-read nb_oargs at the end, after re-reading the opcode.
>
> A couple of asserts need dropping, but that will take care
> of itself as we split the function further.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> tcg/optimize.c | 14 ++++----------
> 1 file changed, 4 insertions(+), 10 deletions(-)
>
> diff --git a/tcg/optimize.c b/tcg/optimize.c
> index 74b9aa025a..77cdffaaef 100644
> --- a/tcg/optimize.c
> +++ b/tcg/optimize.c
<snip>
>
> @@ -1579,6 +1572,7 @@ void tcg_optimize(TCGContext *s)
> if (def->flags & TCG_OPF_BB_END) {
> memset(&ctx.temps_used, 0, sizeof(ctx.temps_used));
> } else {
> + int nb_oargs = def->nb_oargs;
> for (i = 0; i < nb_oargs; i++) {
nit: couldn't you just do for (i = 0; i < deb->nb_oargs; i++) or is that
too much for the compiler to wrap it's head around?
Either way:
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
- [PATCH v2 27/48] tcg/optimize: Split out fold_bswap, (continued)
- [PATCH v2 27/48] tcg/optimize: Split out fold_bswap, Richard Henderson, 2021/10/07
- [PATCH v2 34/48] tcg/optimize: Split out fold_to_not, Richard Henderson, 2021/10/07
- [PATCH v2 03/48] tcg/optimize: Remove do_default label, Richard Henderson, 2021/10/07
- [PATCH v2 05/48] tcg/optimize: Move prev_mb into OptContext, Richard Henderson, 2021/10/07
- [PATCH v2 09/48] tcg/optimize: Drop nb_oargs, nb_iargs locals, Richard Henderson, 2021/10/07
- [PATCH v2 04/48] tcg/optimize: Change tcg_opt_gen_{mov, movi} interface, Richard Henderson, 2021/10/07
- [PATCH v2 10/48] tcg/optimize: Change fail return for do_constant_folding_cond*, Richard Henderson, 2021/10/07
- [PATCH v2 07/48] tcg/optimize: Split out copy_propagate, Richard Henderson, 2021/10/07