diff options
author | Richard Henderson <rth@twiddle.net> | 2016-06-22 15:46:09 -0700 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2016-08-05 21:44:17 +0530 |
commit | a1b3c48d2b23d6eaeb4529d3e1183d2648731bf8 (patch) | |
tree | f75c3f1d950980b386d721fa95183331773ca236 /tcg/tcg.h | |
parent | 51009170d8fc263cfdcd5a60fe3ba213daa3d15b (diff) | |
download | qemu-a1b3c48d2b23d6eaeb4529d3e1183d2648731bf8.zip qemu-a1b3c48d2b23d6eaeb4529d3e1183d2648731bf8.tar.gz qemu-a1b3c48d2b23d6eaeb4529d3e1183d2648731bf8.tar.bz2 |
tcg: Compress liveness data to 16 bits
This reduces both memory usage and per-insn cacheline usage
during code generation.
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'tcg/tcg.h')
-rw-r--r-- | tcg/tcg.h | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -575,6 +575,14 @@ typedef struct TCGTempSet { unsigned long l[BITS_TO_LONGS(TCG_MAX_TEMPS)]; } TCGTempSet; +/* While we limit helpers to 6 arguments, for 32-bit hosts, with padding, + this imples a max of 6*2 (64-bit in) + 2 (64-bit out) = 14 operands. + There are never more than 2 outputs, which means that we can store all + dead + sync data within 16 bits. */ +#define DEAD_ARG 4 +#define SYNC_ARG 1 +typedef uint16_t TCGLifeData; + typedef struct TCGOp { TCGOpcode opc : 8; @@ -608,12 +616,8 @@ struct TCGContext { uintptr_t *tb_jmp_target_addr; /* tb->jmp_target_addr if !USE_DIRECT_JUMP */ /* liveness analysis */ - uint16_t *op_dead_args; /* for each operation, each bit tells if the - corresponding argument is dead */ - uint8_t *op_sync_args; /* for each operation, each bit tells if the - corresponding output argument needs to be - sync to memory. */ - + TCGLifeData *op_arg_life; + TCGRegSet reserved_regs; intptr_t current_frame_offset; intptr_t frame_start; |