qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 05/48] tcg/optimize: Move prev_mb into OptContext


From: Alex Bennée
Subject: Re: [PATCH v2 05/48] tcg/optimize: Move prev_mb into OptContext
Date: Tue, 19 Oct 2021 16:44:18 +0100
User-agent: mu4e 1.7.0; emacs 28.0.60

Richard Henderson <richard.henderson@linaro.org> writes:

> This will expose the variable to subroutines that
> will be broken out of tcg_optimize.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  tcg/optimize.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/tcg/optimize.c b/tcg/optimize.c
> index 627a5b39f6..b875d76354 100644
> --- a/tcg/optimize.c
> +++ b/tcg/optimize.c
> @@ -46,6 +46,7 @@ typedef struct TempOptInfo {
>  
>  typedef struct OptContext {
>      TCGContext *tcg;
> +    TCGOp *prev_mb;
>      TCGTempSet temps_used;
>  } OptContext;
>  
> @@ -609,7 +610,7 @@ static bool swap_commutative2(TCGArg *p1, TCGArg *p2)
>  void tcg_optimize(TCGContext *s)
>  {
>      int nb_temps, nb_globals, i;
> -    TCGOp *op, *op_next, *prev_mb = NULL;
> +    TCGOp *op, *op_next;
>      OptContext ctx = { .tcg = s };

Do we need to add .prev_mb = NULL to ensure the ctx doesn't start
corrupted or does the partial initialisation ensure the rest is zeroed
out?

Otherwise:

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée



reply via email to

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