[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/68] tcg: Copy TCGOP_TYPE in tcg_op_insert_{after,before}
From: |
Richard Henderson |
Subject: |
[PULL 05/68] tcg: Copy TCGOP_TYPE in tcg_op_insert_{after,before} |
Date: |
Fri, 17 Jan 2025 10:23:53 -0800 |
Simplify use within the optimizers by defaulting the
new opcode to the same type as the old opcode.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
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
- [PULL 00/68] tcg patch queue, Richard Henderson, 2025/01/17
- [PULL 01/68] disas/riscv: Guard dec->cfg dereference for host disassemble, Richard Henderson, 2025/01/17
- [PULL 06/68] tcg: Add TCGOP_FLAGS, Richard Henderson, 2025/01/17
- [PULL 02/68] tcg: Move call abi parameters from tcg-target.h to tcg-target.c.inc, Richard Henderson, 2025/01/17
- [PULL 03/68] tcg: Replace TCGOP_VECL with TCGOP_TYPE, Richard Henderson, 2025/01/17
- [PULL 04/68] tcg: Move tcg_op_insert_{after, before} decls to tcg-internal.h, Richard Henderson, 2025/01/17
- [PULL 05/68] tcg: Copy TCGOP_TYPE in tcg_op_insert_{after,before},
Richard Henderson <=
- [PULL 08/68] target/arm: Do not test TCG_TARGET_HAS_bitsel_vec, Richard Henderson, 2025/01/17
- [PULL 10/68] target/tricore: Use tcg_op_supported, Richard Henderson, 2025/01/17
- [PULL 14/68] target/i386: Use tcg_op_supported, Richard Henderson, 2025/01/17
- [PULL 09/68] target/arm: Use tcg_op_supported, Richard Henderson, 2025/01/17
- [PULL 12/68] target/i386: Remove TCG_TARGET_extract_tl_valid, Richard Henderson, 2025/01/17
- [PULL 13/68] target/i386: Use tcg_op_deposit_valid, Richard Henderson, 2025/01/17
- [PULL 07/68] tcg: Add type and flags arguments to tcg_op_supported, Richard Henderson, 2025/01/17
- [PULL 16/68] tcg: Rename tcg-target.opc.h to tcg-target-opc.h.inc, Richard Henderson, 2025/01/17
- [PULL 17/68] tcg/tci: Move TCI specific opcodes to tcg-target-opc.h.inc, Richard Henderson, 2025/01/17
- [PULL 11/68] tcg: Add tcg_op_deposit_valid, Richard Henderson, 2025/01/17