From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH v2 08/28] tcg: Pass TCGTempKind to tcg_temp_new_internal
Date: Wed, 22 Feb 2023 13:26:55 -1000 [thread overview]
Message-ID: <20230222232715.15034-9-richard.henderson@linaro.org> (raw)
In-Reply-To: <20230222232715.15034-1-richard.henderson@linaro.org>
While the argument can only be TEMP_EBB or TEMP_TB,
it's more obvious this way.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/tcg/tcg.h | 18 +++++++++---------
tcg/tcg.c | 8 ++++----
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h
index 02d5cfc049..8d896bcbf4 100644
--- a/include/tcg/tcg.h
+++ b/include/tcg/tcg.h
@@ -855,7 +855,7 @@ void tcg_set_frame(TCGContext *s, TCGReg reg, intptr_t start, intptr_t size);
TCGTemp *tcg_global_mem_new_internal(TCGType, TCGv_ptr,
intptr_t, const char *);
-TCGTemp *tcg_temp_new_internal(TCGType, bool);
+TCGTemp *tcg_temp_new_internal(TCGType, TCGTempKind);
void tcg_temp_free_internal(TCGTemp *);
TCGv_vec tcg_temp_new_vec(TCGType type);
TCGv_vec tcg_temp_new_vec_matching(TCGv_vec match);
@@ -894,13 +894,13 @@ static inline TCGv_i32 tcg_global_mem_new_i32(TCGv_ptr reg, intptr_t offset,
static inline TCGv_i32 tcg_temp_new_i32(void)
{
- TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I32, false);
+ TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I32, TEMP_EBB);
return temp_tcgv_i32(t);
}
static inline TCGv_i32 tcg_temp_local_new_i32(void)
{
- TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I32, true);
+ TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I32, TEMP_TB);
return temp_tcgv_i32(t);
}
@@ -913,25 +913,25 @@ static inline TCGv_i64 tcg_global_mem_new_i64(TCGv_ptr reg, intptr_t offset,
static inline TCGv_i64 tcg_temp_new_i64(void)
{
- TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I64, false);
+ TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I64, TEMP_EBB);
return temp_tcgv_i64(t);
}
static inline TCGv_i64 tcg_temp_local_new_i64(void)
{
- TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I64, true);
+ TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I64, TEMP_TB);
return temp_tcgv_i64(t);
}
static inline TCGv_i128 tcg_temp_new_i128(void)
{
- TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I128, false);
+ TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I128, TEMP_EBB);
return temp_tcgv_i128(t);
}
static inline TCGv_i128 tcg_temp_local_new_i128(void)
{
- TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I128, true);
+ TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I128, TEMP_TB);
return temp_tcgv_i128(t);
}
@@ -944,13 +944,13 @@ static inline TCGv_ptr tcg_global_mem_new_ptr(TCGv_ptr reg, intptr_t offset,
static inline TCGv_ptr tcg_temp_new_ptr(void)
{
- TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_PTR, false);
+ TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_PTR, TEMP_EBB);
return temp_tcgv_ptr(t);
}
static inline TCGv_ptr tcg_temp_local_new_ptr(void)
{
- TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_PTR, true);
+ TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_PTR, TEMP_TB);
return temp_tcgv_ptr(t);
}
diff --git a/tcg/tcg.c b/tcg/tcg.c
index f52e9baf83..bbae9d493b 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1255,10 +1255,10 @@ TCGTemp *tcg_global_mem_new_internal(TCGType type, TCGv_ptr base,
return ts;
}
-TCGTemp *tcg_temp_new_internal(TCGType type, bool temp_local)
+TCGTemp *tcg_temp_new_internal(TCGType type, TCGTempKind kind)
{
TCGContext *s = tcg_ctx;
- TCGTempKind kind = temp_local ? TEMP_TB : TEMP_EBB;
+ bool temp_local = kind == TEMP_TB;
TCGTemp *ts;
int idx, k;
@@ -1341,7 +1341,7 @@ TCGv_vec tcg_temp_new_vec(TCGType type)
}
#endif
- t = tcg_temp_new_internal(type, 0);
+ t = tcg_temp_new_internal(type, TEMP_EBB);
return temp_tcgv_vec(t);
}
@@ -1352,7 +1352,7 @@ TCGv_vec tcg_temp_new_vec_matching(TCGv_vec match)
tcg_debug_assert(t->temp_allocated != 0);
- t = tcg_temp_new_internal(t->base_type, 0);
+ t = tcg_temp_new_internal(t->base_type, TEMP_EBB);
return temp_tcgv_vec(t);
}
--
2.34.1
next prev parent reply other threads:[~2023-02-22 23:31 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-22 23:26 [PATCH v2 00/28] tcg: Simplify temporary usage Richard Henderson
2023-02-22 23:26 ` [PATCH v2 01/28] tcg: Adjust TCGContext.temps_in_use check Richard Henderson
2023-02-22 23:26 ` [PATCH v2 02/28] accel/tcg: Pass max_insn to gen_intermediate_code by pointer Richard Henderson
2023-02-22 23:26 ` [PATCH v2 03/28] accel/tcg: Use more accurate max_insns for tb_overflow Richard Henderson
2023-02-24 8:07 ` Philippe Mathieu-Daudé
2023-02-22 23:26 ` [PATCH v2 04/28] tcg: Remove branch-to-next regardless of reference count Richard Henderson
2023-02-24 8:10 ` Philippe Mathieu-Daudé
2023-02-22 23:26 ` [PATCH v2 05/28] tcg: Rename TEMP_LOCAL to TEMP_TB Richard Henderson
2023-02-22 23:26 ` [PATCH v2 06/28] tcg: Add liveness_pass_0 Richard Henderson
2023-02-22 23:26 ` [PATCH v2 07/28] tcg: Remove TEMP_NORMAL Richard Henderson
2023-02-22 23:26 ` Richard Henderson [this message]
2023-02-22 23:26 ` [PATCH v2 09/28] tcg: Add tcg_temp_ebb_new_{i32,i64,ptr} Richard Henderson
2023-02-22 23:26 ` [PATCH v2 10/28] tcg: Add tcg_gen_movi_ptr Richard Henderson
2023-02-22 23:26 ` [PATCH v2 11/28] tcg: Use tcg_temp_ebb_new_* in tcg/ Richard Henderson
2023-02-22 23:26 ` [PATCH v2 12/28] accel/tcg/plugin: Use tcg_temp_ebb_* Richard Henderson
2023-02-22 23:27 ` [PATCH v2 13/28] accel/tcg/plugin: Tidy plugin_gen_disable_mem_helpers Richard Henderson
2023-02-22 23:27 ` [PATCH v2 14/28] tcg: Don't re-use TEMP_TB temporaries Richard Henderson
2023-02-22 23:27 ` [PATCH v2 15/28] tcg: Change default temp lifetime to TEMP_TB Richard Henderson
2023-02-22 23:27 ` [PATCH v2 16/28] target/arm: Drop copies in gen_sve_{ldr,str} Richard Henderson
2023-02-23 17:31 ` Peter Maydell
2023-02-22 23:27 ` [PATCH v2 17/28] target/arm: Don't use tcg_temp_local_new_* Richard Henderson
2023-02-22 23:27 ` [PATCH v2 18/28] target/cris: Don't use tcg_temp_local_new Richard Henderson
2023-02-22 23:27 ` [PATCH v2 19/28] target/hexagon: Don't use tcg_temp_local_new_* Richard Henderson
2023-02-22 23:27 ` [PATCH v2 20/28] target/hppa: Don't use tcg_temp_local_new Richard Henderson
2023-02-22 23:27 ` [PATCH v2 21/28] target/i386: " Richard Henderson
2023-02-22 23:27 ` [PATCH v2 22/28] target/mips: " Richard Henderson
2023-02-22 23:27 ` [PATCH v2 23/28] target/ppc: " Richard Henderson
2023-02-22 23:27 ` [PATCH v2 24/28] target/xtensa: Don't use tcg_temp_local_new_* Richard Henderson
2023-02-22 23:27 ` [PATCH v2 25/28] exec/gen-icount: Don't use tcg_temp_local_new_i32 Richard Henderson
2023-02-22 23:27 ` [PATCH v2 26/28] tcg: Remove tcg_temp_local_new_*, tcg_const_local_* Richard Henderson
2023-02-22 23:27 ` [PATCH v2 27/28] tcg: Update docs/devel/tcg-ops.rst for temporary changes Richard Henderson
2023-02-23 17:42 ` Peter Maydell
2023-02-22 23:27 ` [PATCH v2 28/28] tcg: Use noinline for major tcg_gen_code_subroutines Richard Henderson
2023-02-23 17:42 ` Peter Maydell
2023-02-24 8:05 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230222232715.15034-9-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).