[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 04/81] tcg: Copy TCGOP_TYPE in tcg_op_insert_{after, before}
From: |
Richard Henderson |
Subject: |
[PATCH v2 04/81] tcg: Copy TCGOP_TYPE in tcg_op_insert_{after, before} |
Date: |
Mon, 6 Jan 2025 23:59:55 -0800 |
Simplify use within the optimizers by defaulting the
new opcode to the same type as the old opcode.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/tcg.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 6838ecdefc..f2bbff8079 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -3249,6 +3249,8 @@ TCGOp *tcg_op_insert_before(TCGContext *s, TCGOp *old_op,
TCGOpcode opc, unsigned nargs)
{
TCGOp *new_op = tcg_op_alloc(opc, nargs);
+
+ TCGOP_TYPE(new_op) = TCGOP_TYPE(old_op);
QTAILQ_INSERT_BEFORE(old_op, new_op, link);
return new_op;
}
@@ -3257,6 +3259,8 @@ TCGOp *tcg_op_insert_after(TCGContext *s, TCGOp *old_op,
TCGOpcode opc, unsigned nargs)
{
TCGOp *new_op = tcg_op_alloc(opc, nargs);
+
+ TCGOP_TYPE(new_op) = TCGOP_TYPE(old_op);
QTAILQ_INSERT_AFTER(&s->ops, old_op, new_op, link);
return new_op;
}
--
2.43.0
- [RFC PATCH v2 00/81] tcg: Merge *_i32 and *_i64 opcodes, Richard Henderson, 2025/01/07
- [PATCH v2 01/81] tcg: Move call abi parameters from tcg-target.h to tcg-target.c.inc, Richard Henderson, 2025/01/07
- [PATCH v2 03/81] tcg: Move tcg_op_insert_{after, before} decls to tcg-internal.h, Richard Henderson, 2025/01/07
- [PATCH v2 04/81] tcg: Copy TCGOP_TYPE in tcg_op_insert_{after, before},
Richard Henderson <=
- [PATCH v2 08/81] target/arm: Use tcg_op_supported, Richard Henderson, 2025/01/07
- [PATCH v2 13/81] target/i386: Use tcg_op_supported, Richard Henderson, 2025/01/07
- [PATCH v2 19/81] tcg: Split out tcg-target-mo.h, Richard Henderson, 2025/01/07
- [PATCH v2 05/81] tcg: Add TCGOP_FLAGS, Richard Henderson, 2025/01/07
- [PATCH v2 16/81] tcg/tci: Move TCI specific opcodes to tcg-target-opc.h.inc, Richard Henderson, 2025/01/07
- [PATCH v2 09/81] target/tricore: Use tcg_op_supported, Richard Henderson, 2025/01/07
- [PATCH v2 17/81] tcg: Move fallback tcg_can_emit_vec_op out of line, Richard Henderson, 2025/01/07