[Beignet] [PATCH] GBE: don't allocate grf for those bools which map to flag.

Yang, Rong R rong.r.yang at intel.com
Sun Jan 26 00:24:51 PST 2014


LGTM, thanks.

-----Original Message-----
From: beignet-bounces at lists.freedesktop.org [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of Zhigang Gong
Sent: Wednesday, January 22, 2014 10:42 AM
To: beignet at lists.freedesktop.org
Cc: Gong, Zhigang
Subject: [Beignet] [PATCH] GBE: don't allocate grf for those bools which map to flag.

Signed-off-by: Zhigang Gong <zhigang.gong at intel.com>
---
 backend/src/backend/gen_reg_allocation.cpp |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/backend/src/backend/gen_reg_allocation.cpp b/backend/src/backend/gen_reg_allocation.cpp
index b42aed8..25db169 100644
--- a/backend/src/backend/gen_reg_allocation.cpp
+++ b/backend/src/backend/gen_reg_allocation.cpp
@@ -484,6 +484,9 @@ namespace gbe
       if (RA.contains(reg))
         continue; // already allocated
 
+      if (ctx.sel->getRegisterFamily(reg) == ir::FAMILY_BOOL && !grfBooleans.contains(reg))
+        continue;
+
       // Case 1: the register belongs to a vector, allocate all the registers in
       // one piece
       auto it = vectorMap.find(reg);
-- 
1.7.9.5

_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list