[Beignet] [PATCH] GBE: Try expire some register before register allocation
Ruiling Song
ruiling.song at intel.com
Tue Apr 22 23:31:29 PDT 2014
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 at 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
More information about the Beignet
mailing list