[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 27/35] tcg/optimize: Pipe OptContext into reset_ts
From: |
Richard Henderson |
Subject: |
[PATCH 27/35] tcg/optimize: Pipe OptContext into reset_ts |
Date: |
Mon, 6 Nov 2023 18:48:34 -0800 |
Will be needed in the next patch.
Reviewed-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/optimize.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tcg/optimize.c b/tcg/optimize.c
index 6b072d4cdb..cbb095b241 100644
--- a/tcg/optimize.c
+++ b/tcg/optimize.c
@@ -123,7 +123,7 @@ static inline bool ts_is_copy(TCGTemp *ts)
}
/* Reset TEMP's state, possibly removing the temp for the list of copies. */
-static void reset_ts(TCGTemp *ts)
+static void reset_ts(OptContext *ctx, TCGTemp *ts)
{
TempOptInfo *ti = ts_info(ts);
TempOptInfo *pi = ts_info(ti->prev_copy);
@@ -138,9 +138,9 @@ static void reset_ts(TCGTemp *ts)
ti->s_mask = 0;
}
-static void reset_temp(TCGArg arg)
+static void reset_temp(OptContext *ctx, TCGArg arg)
{
- reset_ts(arg_temp(arg));
+ reset_ts(ctx, arg_temp(arg));
}
/* Initialize and activate a temporary. */
@@ -239,7 +239,7 @@ static bool tcg_opt_gen_mov(OptContext *ctx, TCGOp *op,
TCGArg dst, TCGArg src)
return true;
}
- reset_ts(dst_ts);
+ reset_ts(ctx, dst_ts);
di = ts_info(dst_ts);
si = ts_info(src_ts);
@@ -702,7 +702,7 @@ static void finish_folding(OptContext *ctx, TCGOp *op)
nb_oargs = def->nb_oargs;
for (i = 0; i < nb_oargs; i++) {
TCGTemp *ts = arg_temp(op->args[i]);
- reset_ts(ts);
+ reset_ts(ctx, ts);
/*
* Save the corresponding known-zero/sign bits mask for the
* first output argument (only one supported so far).
@@ -1215,14 +1215,14 @@ static bool fold_call(OptContext *ctx, TCGOp *op)
for (i = 0; i < nb_globals; i++) {
if (test_bit(i, ctx->temps_used.l)) {
- reset_ts(&ctx->tcg->temps[i]);
+ reset_ts(ctx, &ctx->tcg->temps[i]);
}
}
}
/* Reset temp data for outputs. */
for (i = 0; i < nb_oargs; i++) {
- reset_temp(op->args[i]);
+ reset_temp(ctx, op->args[i]);
}
/* Stop optimizing MB across calls. */
--
2.34.1
- [PATCH 16/35] tcg: Unexport tcg_gen_op*_{i32,i64}, (continued)
- [PATCH 16/35] tcg: Unexport tcg_gen_op*_{i32,i64}, Richard Henderson, 2023/11/06
- [PATCH 18/35] tcg: Move tcg_temp_new_*, tcg_global_mem_new_* out of line, Richard Henderson, 2023/11/06
- [PATCH 19/35] tcg: Move tcg_temp_free_* out of line, Richard Henderson, 2023/11/06
- [PATCH 20/35] tcg/mips: Split out tcg_out_setcond_int, Richard Henderson, 2023/11/06
- [PATCH 21/35] tcg/mips: Always implement movcond, Richard Henderson, 2023/11/06
- [PATCH 06/35] host/include/loongarch64: Add atomic16 load and store, Richard Henderson, 2023/11/06
- [PATCH 22/35] tcg: Remove TCG_TARGET_HAS_movcond_{i32,i64}, Richard Henderson, 2023/11/06
- [PATCH 23/35] tcg/mips: Implement neg opcodes, Richard Henderson, 2023/11/06
- [PATCH 24/35] tcg/loongarch64: Implement neg opcodes, Richard Henderson, 2023/11/06
- [PATCH 26/35] tcg: Don't free vector results, Richard Henderson, 2023/11/06
- [PATCH 27/35] tcg/optimize: Pipe OptContext into reset_ts,
Richard Henderson <=
- [PATCH 29/35] tcg/optimize: Optimize env memory operations, Richard Henderson, 2023/11/06
- [PATCH 30/35] tcg: Eliminate duplicate env store operations, Richard Henderson, 2023/11/06
- [PATCH 25/35] tcg: Remove TCG_TARGET_HAS_neg_{i32,i64}, Richard Henderson, 2023/11/06
- [PATCH 28/35] tcg/optimize: Split out cmp_better_copy, Richard Henderson, 2023/11/06
- [PATCH 31/35] tcg/optimize: Split out arg_new_constant, Richard Henderson, 2023/11/06
- [PATCH 32/35] tcg: Canonicalize subi to addi during opcode generation, Richard Henderson, 2023/11/06
- [PATCH 33/35] tcg/optimize: Canonicalize subi to addi during optimization, Richard Henderson, 2023/11/06
- [PATCH 34/35] tcg/optimize: Canonicalize sub2 with constants to add2, Richard Henderson, 2023/11/06
- [PATCH 35/35] tcg/sparc64: Implement tcg_out_extrl_i64_i32, Richard Henderson, 2023/11/06
- [PULL 00/35] tcg patch queue, Richard Henderson, 2023/11/06