diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2012-10-09 21:53:07 +0200 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2012-10-28 14:54:21 +0100 |
commit | ec7a869d31a1f82fe5b7750d8952c26753ea1df8 (patch) | |
tree | 21670ae1c95815d4888a9098c2c22bbaabaf9573 /tcg/tcg.h | |
parent | 1ad80729bea3d8ed1b67b457af44cbf9bbd8c3ec (diff) |
tcg: sync output arguments on liveness request
Synchronize an output argument when requested by the liveness analysis.
This is needed so that the temp can be declared dead later.
For that, add a new op_sync_args table in which each bit tells if the
corresponding output argument needs to be synchronized with the memory.
Pass it to the tcg_reg_alloc_* functions, and honor this bit. We need to
synchronize the argument before marking it as dead, and we have to make
sure all the infos about the temp are correctly filled.
At the same time change some types from unsigned int to uint16_t when
passing op_dead_args.
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'tcg/tcg.h')
-rw-r--r-- | tcg/tcg.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -381,6 +381,9 @@ struct TCGContext { /* 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. */ /* tells in which temporary a given register is. It does not take into account fixed registers */ |