From patchwork Fri Jun 24 03:48:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 9196499 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CA5016075F for ; Fri, 24 Jun 2016 03:52:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BAA272847D for ; Fri, 24 Jun 2016 03:52:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AFA5528485; Fri, 24 Jun 2016 03:52:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3EEE32847D for ; Fri, 24 Jun 2016 03:52:52 +0000 (UTC) Received: from localhost ([::1]:40573 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGIAk-0001wa-BV for patchwork-qemu-devel@patchwork.kernel.org; Thu, 23 Jun 2016 23:52:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGI6h-0007ZK-TC for qemu-devel@nongnu.org; Thu, 23 Jun 2016 23:48:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGI6a-0001nk-RQ for qemu-devel@nongnu.org; Thu, 23 Jun 2016 23:48:38 -0400 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:32896) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGI6a-0001na-KW for qemu-devel@nongnu.org; Thu, 23 Jun 2016 23:48:32 -0400 Received: by mail-pf0-x241.google.com with SMTP id c74so8146362pfb.0 for ; Thu, 23 Jun 2016 20:48:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=F/CSWkqus9WshqCFhGmSbY7YPbk84B50oTt5Tiwc4Lg=; b=V9BUC19Wu7/6vaGYDUFEydlIcaDk6zPhRv1RG+nhn37jf0VysYyTdYv6QnRQM9vz/9 RS0wRvoPOFZ+5LAAhrcvFs0XW4gZXFvNfiLBBvkiV12hPojJIe3yQO6gMomI34zw9Us6 QtVWqQZEOa6Dd0dfVpEEq93vNJ2FBCONs7xWDuEr/jKamSNvloeFWQakSqbh3Dg4cwqG pGYjL0mmH+Ks4MiDGb7ojGfcTWeMjvr0pr96Ec9/sKUKy6flt3WgW/mUvH1rgGQTkIHH 0YqflON56S33Ot+jhktZF+Honyv+OGD18dF/yYFamGBoj87jQGlIHd4UR4wlVJ6TA1fn svRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=F/CSWkqus9WshqCFhGmSbY7YPbk84B50oTt5Tiwc4Lg=; b=C4eWQUej5D/7gb8kCgC4Tf08lCIpVSipVDfzjeiWpdQx+YPWO01jYtci8NcX0g4GOz o2Dh+R0GkG1ay7AmgijVOo2YXlpAC2j/t8G5f3brMHiiYkYnrBVZBsWkUY62X1i3YCjH hz4XHmiYiMDY6//Ezk4JJBRWeJ5h9z+PW06mcAcRE507e1QpM4aJ5daZZ8zpm9no20AZ VAlJgMbwkcXj/n/+hqubaIgyKTNkifyhC8RyVxd4KfkU1ebwQhANUwKxdLeo4FMScwp5 /MPhxpwh1oJ8hu32AJh1js/PcjAY6nTgBlqYyEwWxTLN8/GYiL7kTYcy46o+DgkY/9S/ +jIQ== X-Gm-Message-State: ALyK8tI7se8qCIGanpqwrUnD9MNm+sCos8scN1MYTfDP2I0I7amqzPtPt+hI9yBHwYexvg== X-Received: by 10.98.68.84 with SMTP id r81mr3453367pfa.26.1466740111784; Thu, 23 Jun 2016 20:48:31 -0700 (PDT) Received: from pike.twiddle.net (71-37-54-227.tukw.qwest.net. [71.37.54.227]) by smtp.gmail.com with ESMTPSA id p129sm3309134pfb.73.2016.06.23.20.48.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jun 2016 20:48:31 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 23 Jun 2016 20:48:21 -0700 Message-Id: <1466740107-15042-4-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1466740107-15042-1-git-send-email-rth@twiddle.net> References: <1466740107-15042-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::241 Subject: [Qemu-devel] [PATCH v3 3/9] tcg: Require liveness analysis X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Richard Henderson Reviewed-by: Aurelien Jarno --- tcg/tcg.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 44de991..64060c6 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" @@ -1306,7 +1305,6 @@ void tcg_op_remove(TCGContext *s, TCGOp *op) #endif } -#ifdef USE_LIVENESS_ANALYSIS /* liveness analysis: end of function: all temps are dead, and globals should be in memory. */ static inline void tcg_la_func_end(TCGContext *s, uint8_t *dead_temps, @@ -1575,18 +1573,6 @@ static void tcg_liveness_analysis(TCGContext *s) } } } -#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) @@ -1838,7 +1824,6 @@ static void temp_load(TCGContext *s, TCGTemp *ts, TCGRegSet desired_regs, static inline 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 @@ -1846,7 +1831,6 @@ static inline void temp_save(TCGContext *s, TCGTemp *ts, tcg_debug_assert(ts->val_type == TEMP_VAL_MEM || ts->fixed_reg); return; } -#endif temp_sync(s, ts, allocated_regs, 1); } @@ -1871,7 +1855,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 @@ -1879,7 +1862,6 @@ static void sync_globals(TCGContext *s, TCGRegSet allocated_regs) || ts->mem_coherent); continue; } -#endif temp_sync(s, ts, allocated_regs, 0); } } @@ -1895,7 +1877,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. @@ -1903,7 +1884,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); } }