GBE: optimize CMP instruction encoding.
authorZhigang Gong <zhigang.gong@intel.com>
Fri, 16 May 2014 11:06:08 +0000 (19:06 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Fri, 23 May 2014 11:09:41 +0000 (19:09 +0800)
commitc9cc192ca00c2cbb43bd72ce733732ce8c2cb874
treeb15f7ac50c3158b0342902041643a4581cd2fdc6
parentd7a940d5f2fab8be42bba6f1affd97df3c5d6e69
GBE: optimize CMP instruction encoding.

This patch fixes the following two things.
1. Use a temporary register as dst register for the CMP
instruction in the middle of a block.
2. fix the switch flag for the CMP instruction at the begining
of each block. As the compact instruction handling will handle
the cmp instruction directly, and will ignore the switch
flag which is incorrect.

This patch could get about 2-3% performance gain for luxmark.

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com>
backend/src/backend/gen_encoder.cpp
backend/src/backend/gen_insn_selection.cpp
backend/src/backend/gen_insn_selection.hpp
backend/src/backend/gen_reg_allocation.cpp