GBE: Fixed a bug in register expieration.
authorZhigang Gong <zhigang.gong@linux.intel.com>
Sun, 9 Jun 2013 07:27:20 +0000 (15:27 +0800)
committerZhigang Gong <zhigang.gong@linux.intel.com>
Sun, 9 Jun 2013 07:46:43 +0000 (15:46 +0800)
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@linux.intel.com>
Reviewed-by: Yang Rong <rong.r.yang@intel.com>
backend/src/backend/gen_reg_allocation.cpp

index 469be12..9765b02 100644 (file)
@@ -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);