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 <[email protected]>
---
 backend/src/backend/gen_insn_selection.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/backend/src/backend/gen_insn_selection.cpp 
b/backend/src/backend/gen_insn_selection.cpp
index 6dc561b..f277cb8 100644
--- a/backend/src/backend/gen_insn_selection.cpp
+++ b/backend/src/backend/gen_insn_selection.cpp
@@ -3167,12 +3167,15 @@ 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
         // We set all the inactive channel to 1 as the 
GEN_PREDICATE_ALIGN1_ALL8/16
         // will check those bits as well.
-
         sel.push();
           //sel.curr.physicalFlag = 0;
           sel.curr.flag = 1;
@@ -3199,6 +3202,7 @@ namespace gbe
 
           sel.JMPI(GenRegister::immd(0), jip);
         sel.pop();
+#endif
 
       } else {
         // Update the PcIPs
-- 
1.8.3.2

_______________________________________________
Beignet mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to