From 2f2e911d0ca27e071c0d62b2e5f0a2ee6e5967f4 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 24 Feb 2023 16:15:18 -1000 Subject: tcg: Remove tcg_check_temp_count, tcg_clear_temp_count Since all temps allocated by guest front-ends are now TEMP_TB, and we don't recycle TEMP_TB, there's no point in requiring that the front-ends free the temps at all. Begin by dropping the inner-most checks that all temps have been freed. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- accel/tcg/translator.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'accel') diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index d0babfe..e00e7fa 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@ -18,17 +18,8 @@ #include "exec/plugin-gen.h" #include "exec/replay-core.h" -/* Pairs with tcg_clear_temp_count. - To be called by #TranslatorOps.{translate_insn,tb_stop} if - (1) the target is sufficiently clean to support reporting, - (2) as and when all temporaries are known to be consumed. - For most targets, (2) is at the end of translate_insn. */ void translator_loop_temp_check(DisasContextBase *db) { - if (tcg_check_temp_count()) { - qemu_log("warning: TCG temporary leaks before " - TARGET_FMT_lx "\n", db->pc_next); - } } bool translator_use_goto_tb(DisasContextBase *db, target_ulong dest) @@ -67,9 +58,6 @@ void translator_loop(CPUState *cpu, TranslationBlock *tb, int *max_insns, ops->init_disas_context(db, cpu); tcg_debug_assert(db->is_jmp == DISAS_NEXT); /* no early exit */ - /* Reset the temp count so that we can identify leaks */ - tcg_clear_temp_count(); - /* Start translating. */ gen_tb_start(db->tb); ops->tb_start(db, cpu); -- cgit v1.1