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

Zhigang Gong zhigang.gong at linux.intel.com
Sun Jun 9 00:30:38 PDT 2013


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



More information about the Beignet mailing list