GBE: fix the large if/endif block issue.
authorZhigang Gong <zhigang.gong@intel.com>
Fri, 25 Apr 2014 07:38:22 +0000 (15:38 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Tue, 29 Apr 2014 04:39:23 +0000 (12:39 +0800)
commitd0a177d76c4fbcefec5fe15c19cc446facf0c71b
treec01edebadc4726b9cca4e47d4f2a35688e4e3e4d
parentb3c92e63d0afec143b9ddde04d601a7b88b4ad53
GBE: fix the large if/endif block issue.

Some test cases have some very large block which contains
more than 32768/2 instructions which could fit into one
if/endif block.

This patch introduce a ifendif fix switch at the GenContext.
Once we encounter one of such error, we set the switch on
and then recompile the kernel. When the switch is on, we will
insert extra endif/if pair to the block to split one if/endif
block to multiple ones to fix the large if/endif issue.

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
backend/src/backend/gen_context.cpp
backend/src/backend/gen_context.hpp
backend/src/backend/gen_insn_selection.cpp
backend/src/backend/gen_program.cpp
backend/src/backend/gen_reg_allocation.cpp