Received: from eggs.gnu.org ([2001:4830:134:3::10]:45173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVqj2-0003I0-Ud for qemu-devel@nongnu.org; Fri, 05 Aug 2016 21:48:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bVqj0-0007xY-Ui for qemu-devel@nongnu.org; Fri, 05 Aug 2016 21:48:31 -0400 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:34958) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVqj0-0007xQ-OR for qemu-devel@nongnu.org; Fri, 05 Aug 2016 21:48:30 -0400 Received: by mail-pf0-x241.google.com with SMTP id h186so20926991pfg.2 for ; Fri, 05 Aug 2016 18:48:30 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Sat, 6 Aug 2016 07:17:53 +0530 Message-Id: <1470448074-20473-7-git-send-email-rth@twiddle.net> In-Reply-To: <1470448074-20473-1-git-send-email-rth@twiddle.net> References: <1470448074-20473-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PULL 6/7] tcg: Require liveness analysis List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- tcg/tcg.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index b0a88ba..3c1f526 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -23,7 +23,6 @@ */ /* define it to use liveness analysis (better code) */ -#define USE_LIVENESS_ANALYSIS #define USE_TCG_OPTIMIZATIONS #include "qemu/osdep.h" @@ -1337,8 +1336,6 @@ void tcg_op_remove(TCGContext *s, TCGOp *op) #endif } -#ifdef USE_LIVENESS_ANALYSIS - #define TS_DEAD 1 #define TS_MEM 2 @@ -1595,18 +1592,6 @@ static void tcg_liveness_analysis(TCGContext *s) op->life = arg_life; } } -#else -/* dummy liveness analysis */ -static void tcg_liveness_analysis(TCGContext *s) -{ - int nb_ops = s->gen_next_op_idx; - - s->op_dead_args = tcg_malloc(nb_ops * sizeof(uint16_t)); - memset(s->op_dead_args, 0, nb_ops * sizeof(uint16_t)); - s->op_sync_args = tcg_malloc(nb_ops * sizeof(uint8_t)); - memset(s->op_sync_args, 0, nb_ops * sizeof(uint8_t)); -} -#endif #ifdef CONFIG_DEBUG_TCG static void dump_regs(TCGContext *s) @@ -1858,7 +1843,6 @@ static void temp_load(TCGContext *s, TCGTemp *ts, TCGRegSet desired_regs, temporary registers needs to be allocated to store a constant. */ static void temp_save(TCGContext *s, TCGTemp *ts, TCGRegSet allocated_regs) { -#ifdef USE_LIVENESS_ANALYSIS /* ??? Liveness does not yet incorporate indirect bases. */ if (!ts->indirect_base) { /* The liveness analysis already ensures that globals are back @@ -1866,7 +1850,6 @@ static void temp_save(TCGContext *s, TCGTemp *ts, TCGRegSet allocated_regs) tcg_debug_assert(ts->val_type == TEMP_VAL_MEM || ts->fixed_reg); return; } -#endif temp_sync(s, ts, allocated_regs, 1); } @@ -1891,7 +1874,6 @@ static void sync_globals(TCGContext *s, TCGRegSet allocated_regs) for (i = 0; i < s->nb_globals; i++) { TCGTemp *ts = &s->temps[i]; -#ifdef USE_LIVENESS_ANALYSIS /* ??? Liveness does not yet incorporate indirect bases. */ if (!ts->indirect_base) { tcg_debug_assert(ts->val_type != TEMP_VAL_REG @@ -1899,7 +1881,6 @@ static void sync_globals(TCGContext *s, TCGRegSet allocated_regs) || ts->mem_coherent); continue; } -#endif temp_sync(s, ts, allocated_regs, 0); } } @@ -1915,7 +1896,6 @@ static void tcg_reg_alloc_bb_end(TCGContext *s, TCGRegSet allocated_regs) if (ts->temp_local) { temp_save(s, ts, allocated_regs); } else { -#ifdef USE_LIVENESS_ANALYSIS /* ??? Liveness does not yet incorporate indirect bases. */ if (!ts->indirect_base) { /* The liveness analysis already ensures that temps are dead. @@ -1923,7 +1903,6 @@ static void tcg_reg_alloc_bb_end(TCGContext *s, TCGRegSet allocated_regs) tcg_debug_assert(ts->val_type == TEMP_VAL_DEAD); continue; } -#endif temp_dead(s, ts); } } -- 2.7.4