From: Jason Ekstrand Date: Fri, 26 Sep 2014 23:08:52 +0000 (-0700) Subject: i965/fs: Properly calculate the number of instructions in calculate_register_pressure X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4ddc25a8d4796316f0296eaa10eba26bd6dd1718;p=mesa.git i965/fs: Properly calculate the number of instructions in calculate_register_pressure Signed-off-by: Jason Ekstrand Reviewed-by: Matt Turner --- diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index b9bd94c3070..6ed3e95ef6e 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(); regs_live_at_ip = rzalloc_array(mem_ctx, int, num_instructions);