From: Ruiling Song Date: Wed, 23 Apr 2014 06:31:29 +0000 (+0800) Subject: GBE: Try expire some register before register allocation X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ac76d0069ea7cf567ec4889e6b20c4252c3b424;p=contrib%2Fbeignet.git GBE: Try expire some register before register allocation 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 --- 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) {