i965/fs: Recalculate live intervals in calculate_register_pressure().
authorMatt Turner <mattst88@gmail.com>
Wed, 26 Mar 2014 20:09:21 +0000 (13:09 -0700)
committerMatt Turner <mattst88@gmail.com>
Sat, 5 Apr 2014 16:44:54 +0000 (09:44 -0700)
Otherwise calling dump_instructions() after declaring a new fs_reg would
segfault when calculate_register_pressure()'s loop over reg walked off
the end of the virtual_grf_start[] array that calculate_live_intervals()
would have reallocated for you, if it had known there was a new
register.

src/mesa/drivers/dri/i965/brw_fs.cpp

index 713e47761d016e8626643c879a0b30faec9fec9e..c88f7c9b7b18d819bc2970464940f8b4728b8b2c 100644 (file)
@@ -3294,6 +3294,7 @@ fs_visitor::assign_binding_table_offsets()
 void
 fs_visitor::calculate_register_pressure()
 {
+   invalidate_live_intervals();
    calculate_live_intervals();
 
    int num_instructions = 0;