GBE: Reduce random behaviour of the code generation
authorZhigang Gong <zhigang.gong@intel.com>
Tue, 29 Jul 2014 04:36:42 +0000 (12:36 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Thu, 31 Jul 2014 02:54:04 +0000 (10:54 +0800)
commitbd0ea0f163c0a2ed80291b89db9f10e99ee57752
tree515eedc0821c7a212ca21f6122dc0a3de44548b5
parent3afae0e4caae5aa592a29bd9717370ea3242d3cd
GBE: Reduce random behaviour of the code generation

There are two major types of random behviour source. One is the
register spill tick. Now we fix it to increase from 0 for
each new code generation.
The second random source is the register sorting. When two
register has the same startID or endID,  their sorting order
is not determined and maybe random in different machine. This
patch mitigate this random source by introduce another comparison
if the main key is identical.

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