[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC][PATCH v0 5/8] Track call-clobbered uses of registers
From: |
Kirill Batuzov |
Subject: |
[Qemu-devel] [RFC][PATCH v0 5/8] Track call-clobbered uses of registers |
Date: |
Mon, 23 May 2011 18:40:51 +0400 |
Adjust next use for call-clobbered registers.
Signed-off-by: Kirill Batuzov <address@hidden>
---
tcg/tcg.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 799b245..8ab556d 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -2125,6 +2125,9 @@ static inline int tcg_gen_code_common(TCGContext *s,
uint8_t *gen_code_buf,
int nb_args;
unsigned int dead_iargs;
const TCGArg *args;
+#ifdef USE_ADVANCED_REGALLOC
+ int reg;
+#endif
#ifdef DEBUG_DISAS
if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) {
@@ -2166,6 +2169,15 @@ static inline int tcg_gen_code_common(TCGContext *s,
uint8_t *gen_code_buf,
tcg_table_op_count[opc]++;
#endif
def = &tcg_op_defs[opc];
+
+#ifdef USE_ADVANCED_REGALLOC
+ for (reg = 0; reg < TCG_TARGET_NB_REGS; reg++) {
+ if (tcg_regset_test_reg(tcg_target_call_clobber_regs, reg)
+ && s->reg_next_use[reg] > s->next_call[op_index]) {
+ s->reg_next_use[reg] = s->next_call[op_index];
+ }
+ }
+#endif
#if 0
printf("%s: %d %d %d\n", def->name,
def->nb_oargs, def->nb_iargs, def->nb_cargs);
--
1.7.4.1
- [Qemu-devel] [RFC][PATCH v0 0/8] Improve register allocator, Kirill Batuzov, 2011/05/23
- [Qemu-devel] [RFC][PATCH v0 4/8] Calculate NEXT_CALL liveness information., Kirill Batuzov, 2011/05/23
- [Qemu-devel] [RFC][PATCH v0 6/8] Spill globals early if their next use is in call., Kirill Batuzov, 2011/05/23
- [Qemu-devel] [RFC][PATCH v0 2/8] Propagate REG_NEXT_USE value through process of register allocation., Kirill Batuzov, 2011/05/23
- [Qemu-devel] [RFC][PATCH v0 5/8] Track call-clobbered uses of registers,
Kirill Batuzov <=
- [Qemu-devel] [RFC][PATCH v0 1/8] Compute additional liveness information for register allocator., Kirill Batuzov, 2011/05/23
- [Qemu-devel] [RFC][PATCH v0 8/8] Add spill count profiling., Kirill Batuzov, 2011/05/23
- [Qemu-devel] [RFC][PATCH v0 7/8] Spill globals early if their next use is at the BB end., Kirill Batuzov, 2011/05/23
- [Qemu-devel] [RFC][PATCH v0 3/8] Do better spill choice., Kirill Batuzov, 2011/05/23
- Re: [Qemu-devel] [RFC][PATCH v0 0/8] Improve register allocator, Aurelien Jarno, 2011/05/23