[Mesa-dev] [PATCH 16/16] i965/fs: Print the maximum register pressure.

Matt Turner mattst88 at gmail.com
Thu Dec 19 13:40:30 PST 2013


---
 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 606e21a..e1edd0f 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -2947,13 +2947,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
-- 
1.8.3.2



More information about the mesa-dev mailing list