summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuiling Song <ruiling.song@intel.com>2014-04-23 14:31:29 +0800
committerZhigang Gong <zhigang.gong@intel.com>2014-04-23 13:58:27 +0800
commit5ac76d0069ea7cf567ec4889e6b20c4252c3b424 (patch)
tree1990e85b9e446f07cb73620de398cfaad4d64345
parent3af12cc7f18c345afa3219343310d0028a2dc17f (diff)
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 <ruiling.song@intel.com>
-rw-r--r--backend/src/backend/gen_reg_allocation.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/backend/src/backend/gen_reg_allocation.cpp b/backend/src/backend/gen_reg_allocation.cpp
index 6ae2dc7b..c45fed79 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) {