aboutsummaryrefslogtreecommitdiff
path: root/tcg
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2014-03-30 20:40:35 -0700
committerRichard Henderson <rth@twiddle.net>2015-02-12 21:21:38 -0800
commit15fc7daa770764cc795158cbb525569f156f3659 (patch)
tree6e32159b0f8f703a575e1f70903a5cab6996f09b /tcg
parenta4ce099a7a4b4734c372f6bf28f3362e370f23c1 (diff)
downloadqemu-15fc7daa770764cc795158cbb525569f156f3659.zip
qemu-15fc7daa770764cc795158cbb525569f156f3659.tar.gz
qemu-15fc7daa770764cc795158cbb525569f156f3659.tar.bz2
tcg: Remove unused opcodes
We no longer need INDEX_op_end to terminate the list, nor do we need 5 forms of nop, since we just remove the TCGOp instead. Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'tcg')
-rw-r--r--tcg/tcg-opc.h9
-rw-r--r--tcg/tcg.c7
2 files changed, 2 insertions, 14 deletions
diff --git a/tcg/tcg-opc.h b/tcg/tcg-opc.h
index 042d442..42d0cfe 100644
--- a/tcg/tcg-opc.h
+++ b/tcg/tcg-opc.h
@@ -27,15 +27,6 @@
*/
/* predefined ops */
-DEF(end, 0, 0, 0, TCG_OPF_NOT_PRESENT) /* must be kept first */
-DEF(nop, 0, 0, 0, TCG_OPF_NOT_PRESENT)
-DEF(nop1, 0, 0, 1, TCG_OPF_NOT_PRESENT)
-DEF(nop2, 0, 0, 2, TCG_OPF_NOT_PRESENT)
-DEF(nop3, 0, 0, 3, TCG_OPF_NOT_PRESENT)
-
-/* variable number of parameters */
-DEF(nopn, 0, 0, 1, TCG_OPF_NOT_PRESENT)
-
DEF(discard, 1, 0, 0, TCG_OPF_NOT_PRESENT)
DEF(set_label, 0, 0, 1, TCG_OPF_BB_END | TCG_OPF_NOT_PRESENT)
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 4115e8b..3841e99 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1260,7 +1260,7 @@ void tcg_op_remove(TCGContext *s, TCGOp *op)
s->gen_first_op_idx = next;
}
- *op = (TCGOp){ .opc = INDEX_op_nop, .next = -1, .prev = -1 };
+ memset(op, -1, sizeof(*op));
#ifdef CONFIG_PROFILER
s->del_op_count++;
@@ -1385,8 +1385,6 @@ static void tcg_liveness_analysis(TCGContext *s)
}
break;
case INDEX_op_debug_insn_start:
- case INDEX_op_nop:
- case INDEX_op_end:
break;
case INDEX_op_discard:
/* mark the temporary as dead */
@@ -2244,7 +2242,7 @@ void tcg_dump_op_count(FILE *f, fprintf_function cpu_fprintf)
{
int i;
- for(i = INDEX_op_end; i < NB_OPS; i++) {
+ for (i = 0; i < NB_OPS; i++) {
cpu_fprintf(f, "%s %" PRId64 "\n", tcg_op_defs[i].name,
tcg_table_op_count[i]);
}
@@ -2328,7 +2326,6 @@ static inline int tcg_gen_code_common(TCGContext *s,
tcg_reg_alloc_movi(s, args, dead_args, sync_args);
break;
case INDEX_op_debug_insn_start:
- case INDEX_op_nop:
break;
case INDEX_op_discard:
temp_dead(s, args[0]);