1. This would free unused register asap, so it becomes easy to allocate
   contiguous registers.

2. We previously met many hidden register liveness issue. Let's try
   to reuse the expired register early. Then I think wrong liveness may
   easy to find.

Signed-off-by: Ruiling Song <ruiling.s...@intel.com>
---
 backend/src/backend/gen_reg_allocation.cpp |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/backend/src/backend/gen_reg_allocation.cpp 
b/backend/src/backend/gen_reg_allocation.cpp
index 6ae2dc7..c45fed7 100644
--- a/backend/src/backend/gen_reg_allocation.cpp
+++ b/backend/src/backend/gen_reg_allocation.cpp
@@ -879,6 +879,8 @@ namespace gbe
                                                        uint32_t size,
                                                        uint32_t alignment) {
     uint32_t grfOffset;
+
+    this->expireGRF(interval);
     while ((grfOffset = ctx.allocate(size, alignment)) == 0) {
       const bool success = this->expireGRF(interval);
       if (success == false) {
-- 
1.7.10.4

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

Reply via email to