tcg: mark set_label with TCG_OPF_BB_END flag
authorAurelien Jarno <aurelien@aurel32.net>
Mon, 10 Sep 2012 12:23:49 +0000 (14:23 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Wed, 19 Sep 2012 19:40:46 +0000 (21:40 +0200)
set_label is effectively the end of a basic block, as no optimization
can be made accross it. It was treated as such in the liveness analysis
code, but as a special case.

Mark it with TCG_OPF_BB_END flag so that this information can be used
by other parts of the TCG code, and remove the special case in the liveness
analysis code.

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tcg/tcg-opc.h
tcg/tcg.c

index 8e06d03b17e2b2ad06068966465576cfb32921d8..d12e8d01e928e70afefa7b2b1822ca015f561323 100644 (file)
@@ -36,7 +36,7 @@ DEF(nopn, 0, 0, 1, 0) /* variable number of parameters */
 
 DEF(discard, 1, 0, 0, 0)
 
-DEF(set_label, 0, 0, 1, 0)
+DEF(set_label, 0, 0, 1, TCG_OPF_BB_END)
 DEF(call, 0, 1, 2, TCG_OPF_SIDE_EFFECTS) /* variable number of parameters */
 DEF(jmp, 0, 1, 0, TCG_OPF_BB_END | TCG_OPF_SIDE_EFFECTS)
 DEF(br, 0, 0, 1, TCG_OPF_BB_END | TCG_OPF_SIDE_EFFECTS)
index a4e7f42c783fa1bf354e27b4d6d28ec085265d20..b8a1bec5dc7ad4fe3d2283a3645a8a20debead0c 100644 (file)
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1297,11 +1297,6 @@ static void tcg_liveness_analysis(TCGContext *s)
                 args--;
             }
             break;
-        case INDEX_op_set_label:
-            args--;
-            /* mark end of basic block */
-            tcg_la_bb_end(s, dead_temps);
-            break;
         case INDEX_op_debug_insn_start:
             args -= def->nb_args;
             break;