diff options
author | Kirill Batuzov <batuzovk@ispras.ru> | 2011-07-07 16:37:12 +0400 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2011-07-30 10:51:25 +0000 |
commit | 8f2e8c07a65c340b525b08e08925b568844d4f3d (patch) | |
tree | 9f39a4014c78189ad2e6915d7994692d07d84139 /tcg/tcg.c | |
parent | 3e4571724fb92c77de81d8b54957de8232be6706 (diff) |
Add TCG optimizations stub
Added file tcg/optimize.c to hold TCG optimizations. Function tcg_optimize
is called from tcg_gen_code_common. It calls other functions performing
specific optimizations. Stub for constant folding was added.
Signed-off-by: Kirill Batuzov <batuzovk@ispras.ru>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'tcg/tcg.c')
-rw-r--r-- | tcg/tcg.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -24,6 +24,7 @@ /* define it to use liveness analysis (better code) */ #define USE_LIVENESS_ANALYSIS +#define USE_TCG_OPTIMIZATIONS #include "config.h" @@ -2035,6 +2036,11 @@ static inline int tcg_gen_code_common(TCGContext *s, uint8_t *gen_code_buf, } #endif +#ifdef USE_TCG_OPTIMIZATIONS + gen_opparam_ptr = + tcg_optimize(s, gen_opc_ptr, gen_opparam_buf, tcg_op_defs); +#endif + #ifdef CONFIG_PROFILER s->la_time -= profile_getclock(); #endif |