Message ID | 20230225091427.1817156-1-richard.henderson@linaro.org |
---|---|
Headers | show |
Series | tcg: Drop tcg_temp_free from translators | expand |
On 25/2/23 10:13, Richard Henderson wrote: > Based-on: 20230225085945.1798188-1-richard.henderson@linaro.org > ("[PATCH v3 00/30] tcg: Simplify temporary usage") > > In the above patch set, we changed the lifetime of the temps > allocated by the guest translators, and eliminated their reuse, > so that we have the best chance of reducing their strength. > > That we don't reuse them means that we gain nothing by freeing them. > Therefore, drop all mention of tcg_temp_free from target/. > > This may be the most negative diffstat I've ever produced. :-) > 94 files changed, 471 insertions(+), 7143 deletions(-) 7143 + 2 = 7145 by removing tcg_const_ptr(): -- >8 -- diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 43ce4bfa7d..64b88268cd 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -1020,6 +1020,4 @@ TCGv_vec tcg_constant_vec_matching(TCGv_vec match, unsigned vece, int64_t val); #if UINTPTR_MAX == UINT32_MAX -# define tcg_const_ptr(x) ((TCGv_ptr)tcg_const_i32((intptr_t)(x))) # define tcg_constant_ptr(x) ((TCGv_ptr)tcg_constant_i32((intptr_t)(x))) #else -# define tcg_const_ptr(x) ((TCGv_ptr)tcg_const_i64((intptr_t)(x))) # define tcg_constant_ptr(x) ((TCGv_ptr)tcg_constant_i64((intptr_t)(x))) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 5bf80b22d7..ce40fac557 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -4210,3 +4210,3 @@ void gen_sve_ldr(DisasContext *s, TCGv_ptr base, int vofs, TCGLabel *loop = gen_new_label(); - TCGv_ptr tp, i = tcg_const_ptr(0); + TCGv_ptr tp, i = tcg_constant_ptr(NULL); @@ -4288,3 +4288,3 @@ void gen_sve_str(DisasContext *s, TCGv_ptr base, int vofs, TCGLabel *loop = gen_new_label(); - TCGv_ptr tp, i = tcg_const_ptr(0); + TCGv_ptr tp, i = tcg_constant_ptr(NULL); ---
On 25/2/23 11:10, Philippe Mathieu-Daudé wrote: > On 25/2/23 10:13, Richard Henderson wrote: >> Based-on: 20230225085945.1798188-1-richard.henderson@linaro.org >> ("[PATCH v3 00/30] tcg: Simplify temporary usage") >> >> In the above patch set, we changed the lifetime of the temps >> allocated by the guest translators, and eliminated their reuse, >> so that we have the best chance of reducing their strength. >> >> That we don't reuse them means that we gain nothing by freeing them. >> Therefore, drop all mention of tcg_temp_free from target/. >> >> This may be the most negative diffstat I've ever produced. :-) > >> 94 files changed, 471 insertions(+), 7143 deletions(-) > > 7143 + 2 = 7145 by removing tcg_const_ptr(): > > -- >8 -- > diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h > index 43ce4bfa7d..64b88268cd 100644 > --- a/include/tcg/tcg.h > +++ b/include/tcg/tcg.h > @@ -1020,6 +1020,4 @@ TCGv_vec tcg_constant_vec_matching(TCGv_vec match, > unsigned vece, int64_t val); > #if UINTPTR_MAX == UINT32_MAX > -# define tcg_const_ptr(x) ((TCGv_ptr)tcg_const_i32((intptr_t)(x))) > # define tcg_constant_ptr(x) ((TCGv_ptr)tcg_constant_i32((intptr_t)(x))) > #else > -# define tcg_const_ptr(x) ((TCGv_ptr)tcg_const_i64((intptr_t)(x))) > # define tcg_constant_ptr(x) ((TCGv_ptr)tcg_constant_i64((intptr_t)(x))) > diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c > index 5bf80b22d7..ce40fac557 100644 > --- a/target/arm/translate-sve.c > +++ b/target/arm/translate-sve.c > @@ -4210,3 +4210,3 @@ void gen_sve_ldr(DisasContext *s, TCGv_ptr base, > int vofs, > TCGLabel *loop = gen_new_label(); > - TCGv_ptr tp, i = tcg_const_ptr(0); > + TCGv_ptr tp, i = tcg_constant_ptr(NULL); Scratch that, I missed i is modified: tcg_gen_addi_ptr(i, i, 8);