[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v3 27/38] tcg: Optimize past conditional branches
From: |
Richard Henderson |
Subject: |
[PULL v3 27/38] tcg: Optimize past conditional branches |
Date: |
Mon, 23 Oct 2023 11:13:18 -0700 |
We already register allocate through extended basic blocks,
optimize through extended basic blocks as well.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/optimize.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/tcg/optimize.c b/tcg/optimize.c
index 3013eb04e6..2db5177c32 100644
--- a/tcg/optimize.c
+++ b/tcg/optimize.c
@@ -688,12 +688,14 @@ static void finish_folding(OptContext *ctx, TCGOp *op)
int i, nb_oargs;
/*
- * For an opcode that ends a BB, reset all temp data.
- * We do no cross-BB optimization.
+ * We only optimize extended basic blocks. If the opcode ends a BB
+ * and is not a conditional branch, reset all temp data.
*/
if (def->flags & TCG_OPF_BB_END) {
- memset(&ctx->temps_used, 0, sizeof(ctx->temps_used));
ctx->prev_mb = NULL;
+ if (!(def->flags & TCG_OPF_COND_BRANCH)) {
+ memset(&ctx->temps_used, 0, sizeof(ctx->temps_used));
+ }
return;
}
--
2.34.1
- [PULL v3 14/38] tcg: Introduce tcg_use_softmmu, (continued)
- [PULL v3 14/38] tcg: Introduce tcg_use_softmmu, Richard Henderson, 2023/10/23
- [PULL v3 16/38] tcg/arm: Use tcg_use_softmmu, Richard Henderson, 2023/10/23
- [PULL v3 13/38] tcg/ppc: Disable TCG_REG_TB for Power9/Power10, Richard Henderson, 2023/10/23
- [PULL v3 18/38] tcg/i386: Use tcg_use_softmmu, Richard Henderson, 2023/10/23
- [PULL v3 20/38] tcg/mips: Use tcg_use_softmmu, Richard Henderson, 2023/10/23
- [PULL v3 22/38] tcg/riscv: Do not reserve TCG_GUEST_BASE_REG for guest_base zero, Richard Henderson, 2023/10/23
- [PULL v3 21/38] tcg/ppc: Use tcg_use_softmmu, Richard Henderson, 2023/10/23
- [PULL v3 17/38] tcg/aarch64: Use tcg_use_softmmu, Richard Henderson, 2023/10/23
- [PULL v3 19/38] tcg/loongarch64: Use tcg_use_softmmu, Richard Henderson, 2023/10/23
- [PULL v3 15/38] tcg: Provide guest_base fallback for system mode, Richard Henderson, 2023/10/23
- [PULL v3 27/38] tcg: Optimize past conditional branches,
Richard Henderson <=
- [PULL v3 28/38] tcg: Add tcg_gen_{ld,st}_i128, Richard Henderson, 2023/10/23
- [PULL v3 29/38] target/i386: Use i128 for 128 and 256-bit loads and stores, Richard Henderson, 2023/10/23
- [PULL v3 23/38] tcg/riscv: Use tcg_use_softmmu, Richard Henderson, 2023/10/23
- [PULL v3 24/38] tcg/s390x: Use tcg_use_softmmu, Richard Henderson, 2023/10/23
- [PULL v3 31/38] tcg: Export tcg_gen_ext_{i32,i64,tl}, Richard Henderson, 2023/10/23
- [PULL v3 32/38] tcg: Define MO_TL, Richard Henderson, 2023/10/23
- [PULL v3 34/38] target/i386: Use tcg_gen_ext_tl, Richard Henderson, 2023/10/23
- [PULL v3 33/38] target/arm: Use tcg_gen_ext_i64, Richard Henderson, 2023/10/23
- [PULL v3 25/38] tcg: drop unused tcg_temp_free define, Richard Henderson, 2023/10/23
- [PULL v3 26/38] tcg: Use constant zero when expanding with divu2, Richard Henderson, 2023/10/23