qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]