GBE: Optimize the forward jump instruction.
authorZhigang Gong <zhigang.gong@intel.com>
Mon, 17 Mar 2014 10:02:37 +0000 (18:02 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Tue, 25 Mar 2014 05:21:46 +0000 (13:21 +0800)
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 <zhigang.gong@intel.com>
Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
backend/src/backend/gen_insn_selection.cpp

index 48b3069..663ca64 100644 (file)
@@ -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