qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [PATCH 08/11] tcg/optimize: Remove redundant statement in tcg_optimi


From: Chenqun (kuhn)
Subject: RE: [PATCH 08/11] tcg/optimize: Remove redundant statement in tcg_optimize()
Date: Mon, 17 Aug 2020 13:04:27 +0000

> > diff --git a/tcg/optimize.c b/tcg/optimize.c index
> > 53aa8e5329..d5bea37290 100644
> > --- a/tcg/optimize.c
> > +++ b/tcg/optimize.c
> > @@ -1264,7 +1264,6 @@ void tcg_optimize(TCGContext *s)
> >                  op->opc = opc = (opc == INDEX_op_movcond_i32
> >                                   ? INDEX_op_setcond_i32
> >                                   : INDEX_op_setcond_i64);
> > -                nb_iargs = 2;
> >              }
> >              goto do_default;
> 
> I prefer not to make this change.
> 
> nb_iargs is the cached value that corresponds to opc, which we have just
> changed.  If we later make a change at "do_default" that uses nb_iargs,
> failure to update the value here will be a very hard bug to find.
Hi Richard,

  I think you're thinking more carefully, even though ' nb_iargs' not used in 
'do_default' now.

However, I have only one small question. Why does 'nb_iargs' need to be 
assigned a value for this case branch?
Other branches(eg:' CASE_OP_32_64(brcond)') have changed the opc value too. Do 
we need to assign a value to nb_iargs for it?

Thanks.

reply via email to

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