This patch series improves the TCG optimizer, based on patterns found while executing various guest. The brcond ad setcond constant folding are useful especially useful when they are used to avoid some argument values (e.g. division by 0), and thus can be optimized when this argument is a constant.
This bring around 0.5% improvement on openssl like benchmarks. Modifications between V1 and V2 following feedback I got: - In the first patch, account for the liveness analysis time and optimizing pass time separately - Fixed swith/break in patch 7 to correctly throw an error - Added patch 9 to make the code more readable Other patches are unmodified. Aurelien Jarno (9): tcg: improve profiler tcg/optimize: split expression simplification tcg/optimize: simplify or/xor r, a, 0 cases tcg/optimize: simplify and r, a, 0 cases tcg/optimize: simplify shift/rot r, 0, a => movi r, 0 cases tcg/optimize: swap brcond/setcond arguments when possible tcg/optimize: add constant folding for setcond tcg/optimize: add constant folding for brcond tcg/optimize: fix if/else/break coding style tcg/optimize.c | 179 +++++++++++++++++++++++++++++++++++++++++++++++++++----- tcg/tcg.c | 12 +++- tcg/tcg.h | 1 + 3 files changed, 175 insertions(+), 17 deletions(-) -- 1.7.10.4