i965/fs: Print the maximum register pressure.
authorMatt Turner <mattst88@gmail.com>
Sun, 15 Dec 2013 02:37:16 +0000 (18:37 -0800)
committerMatt Turner <mattst88@gmail.com>
Tue, 21 Jan 2014 22:20:44 +0000 (14:20 -0800)
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/brw_fs.cpp

index 181a9393b8c43280566fe0a4e0b6df3e4c4b4942..4a96126bac566d0eda0e3217454981472dd720d9 100644 (file)
@@ -2946,13 +2946,15 @@ fs_visitor::dump_instructions()
 {
    calculate_register_pressure();
 
-   int ip = 0;
+   int ip = 0, max_pressure = 0;
    foreach_list(node, &this->instructions) {
       backend_instruction *inst = (backend_instruction *)node;
+      max_pressure = MAX2(max_pressure, regs_live_at_ip[ip]);
       printf("{%3d} %4d: ", regs_live_at_ip[ip], ip);
       dump_instruction(inst);
       ++ip;
    }
+   printf("Maximum %3d registers live at once.\n", max_pressure);
 }
 
 void