[Mesa-dev] [PATCH] i965/fs: Properly calculate the number of instructions in calculate_register_pressure

Ilia Mirkin imirkin at alum.mit.edu
Fri Sep 26 16:12:26 PDT 2014


On Fri, Sep 26, 2014 at 7:09 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> ---
>  src/mesa/drivers/dri/i965/brw_fs.cpp | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
> index b9bd94c..97b39e1 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
> @@ -3400,7 +3400,9 @@ fs_visitor::calculate_register_pressure()
>     invalidate_live_intervals();
>     calculate_live_intervals();
>
> -   unsigned num_instructions = instructions.length();
> +   unsigned num_instructions = 0;
> +   foreach_block(block, cfg)
> +      num_instructions = block->instructions.length();

This seems odd. Did you mean += perchance?

>
>     regs_live_at_ip = rzalloc_array(mem_ctx, int, num_instructions);
>
> --
> 2.1.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list