From 28da2d400031860ee4f9f936ef91bf75c5d2c8cd Mon Sep 17 00:00:00 2001 From: Zhigang Gong Date: Mon, 17 Mar 2014 18:02:37 +0800 Subject: [PATCH] GBE: Optimize the forward jump instruction. As at each BB's begining, we already checked whether all channels are inactive, we don't really need to do this duplicate checking at the end of forward jump. This patch get about 25% performance gain for the luxmark's median scene. Signed-off-by: Zhigang Gong Reviewed-by: "Yang, Rong R" --- backend/src/backend/gen_insn_selection.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/src/backend/gen_insn_selection.cpp b/backend/src/backend/gen_insn_selection.cpp index 48b3069..663ca64 100644 --- a/backend/src/backend/gen_insn_selection.cpp +++ b/backend/src/backend/gen_insn_selection.cpp @@ -3248,6 +3248,10 @@ namespace gbe if (nextLabel == jip) return; + // As at each BB's begining, we already checked whether all channels are inactive, + // we don't really need to do this duplicate checking at the end of forward jump. + // Just comment out the following code, and may be deleted in the future. +#if 0 // It is slightly more complicated than for backward jump. We check that // all PcIPs are greater than the next block IP to be sure that we can // jump @@ -3279,6 +3283,7 @@ namespace gbe sel.JMPI(GenRegister::immd(0), jip); sel.pop(); +#endif } else { // Update the PcIPs -- 2.7.4