[Beignet] [PATCH] GBE: Try expire some register before register allocation
Zhigang Gong
zhigang.gong at linux.intel.com
Tue Apr 22 22:57:13 PDT 2014
LGTM, will push latter, thanks.
On Wed, Apr 23, 2014 at 02:31:29PM +0800, Ruiling Song wrote:
> 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
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list