[Beignet] [PATCH] GBE: Fixed a bug in register expieration.

Yang, Rong R rong.r.yang at intel.com
Sun Jun 9 00:37:36 PDT 2013


LGTM.

Thanks,
YangRong
-----Original Message-----
From: beignet-bounces+rong.r.yang=intel.com at lists.freedesktop.org [mailto:beignet-bounces+rong.r.yang=intel.com at lists.freedesktop.org] On Behalf Of Zhigang Gong
Sent: Sunday, June 09, 2013 3:31 PM
To: beignet at lists.freedesktop.org
Cc: Zhigang Gong
Subject: [Beignet] [PATCH] GBE: Fixed a bug in register expieration.

Some special register which are preallocated at g0 and not managed by our register allocator. So we need to ignore them when process the register expieration. Otherwise, it will trigger an assert latter.

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

diff --git a/backend/src/backend/gen_reg_allocation.cpp b/backend/src/backend/gen_reg_allocation.cpp
index 469be12..9765b02 100644
--- a/backend/src/backend/gen_reg_allocation.cpp
+++ b/backend/src/backend/gen_reg_allocation.cpp
@@ -270,7 +270,11 @@ namespace gbe
         return false;
       auto it = RA.find(reg);
       GBE_ASSERT(it != RA.end());
-
+      // offset less than 32 means it is not managed by our reg allocator.
+      if (it->second < 32) {
+        this->expiringID++;
+        continue;
+      }
       // Case 1 - it does not belong to a vector. Just remove it
       if (vectorMap.contains(reg) == false) {
         ctx.deallocate(it->second);
--
1.7.11.7

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


More information about the Beignet mailing list