dcavalca / rpms / qemu

Forked from rpms/qemu 11 months ago
Clone

Blame 0041-tcg-mark-set_label-with-TCG_OPF_BB_END-flag.patch

5544c1
From 1610a0e56c0be3e4bfd3034e5323188b1d05badd Mon Sep 17 00:00:00 2001
5544c1
From: Aurelien Jarno <aurelien@aurel32.net>
5544c1
Date: Mon, 10 Sep 2012 14:23:49 +0200
5544c1
Subject: [PATCH] tcg: mark set_label with TCG_OPF_BB_END flag
5544c1
5544c1
set_label is effectively the end of a basic block, as no optimization
5544c1
can be made accross it. It was treated as such in the liveness analysis
5544c1
code, but as a special case.
5544c1
5544c1
Mark it with TCG_OPF_BB_END flag so that this information can be used
5544c1
by other parts of the TCG code, and remove the special case in the liveness
5544c1
analysis code.
5544c1
5544c1
Cc: Blue Swirl <blauwirbel@gmail.com>
5544c1
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
5544c1
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
5544c1
---
5544c1
 tcg/tcg-opc.h | 2 +-
5544c1
 tcg/tcg.c     | 5 -----
5544c1
 2 files changed, 1 insertion(+), 6 deletions(-)
5544c1
5544c1
diff --git a/tcg/tcg-opc.h b/tcg/tcg-opc.h
5544c1
index 8e06d03..d12e8d0 100644
5544c1
--- a/tcg/tcg-opc.h
5544c1
+++ b/tcg/tcg-opc.h
5544c1
@@ -36,7 +36,7 @@ DEF(nopn, 0, 0, 1, 0) /* variable number of parameters */
5544c1
 
5544c1
 DEF(discard, 1, 0, 0, 0)
5544c1
 
5544c1
-DEF(set_label, 0, 0, 1, 0)
5544c1
+DEF(set_label, 0, 0, 1, TCG_OPF_BB_END)
5544c1
 DEF(call, 0, 1, 2, TCG_OPF_SIDE_EFFECTS) /* variable number of parameters */
5544c1
 DEF(jmp, 0, 1, 0, TCG_OPF_BB_END | TCG_OPF_SIDE_EFFECTS)
5544c1
 DEF(br, 0, 0, 1, TCG_OPF_BB_END | TCG_OPF_SIDE_EFFECTS)
5544c1
diff --git a/tcg/tcg.c b/tcg/tcg.c
5544c1
index 8386b70..c002a88 100644
5544c1
--- a/tcg/tcg.c
5544c1
+++ b/tcg/tcg.c
5544c1
@@ -1297,11 +1297,6 @@ static void tcg_liveness_analysis(TCGContext *s)
5544c1
                 args--;
5544c1
             }
5544c1
             break;
5544c1
-        case INDEX_op_set_label:
5544c1
-            args--;
5544c1
-            /* mark end of basic block */
5544c1
-            tcg_la_bb_end(s, dead_temps);
5544c1
-            break;
5544c1
         case INDEX_op_debug_insn_start:
5544c1
             args -= def->nb_args;
5544c1
             break;
5544c1
-- 
5544c1
1.7.12.1
5544c1