OSDN Git Service

i965/fs: Debug the optimization passes by dumping instr to file.
authorMatt Turner <mattst88@gmail.com>
Mon, 7 Apr 2014 17:25:50 +0000 (10:25 -0700)
committerMatt Turner <mattst88@gmail.com>
Sun, 1 Jun 2014 20:18:52 +0000 (13:18 -0700)
commit55bd8b8b660f983b486e699ca74fe5652297331d
tree743de296b59dc4fcd03afd369aeabf91bd8b7d0a
parente9bf1662b048e5927f841e84719a3180650a2b0a
i965/fs: Debug the optimization passes by dumping instr to file.

With INTEL_DEBUG=optimizer, write the output of dump_instructions() to a
file each time an optimization pass makes progress. This lets you easily
diff successive files to see what an optimization pass did.

Example filenames written when running glxgears:
   fs8-0000-00-start
   fs8-0000-01-04-opt_copy_propagate
   fs8-0000-01-06-dead_code_eliminate
   fs8-0000-01-12-compute_to_mrf
   fs8-0000-02-06-dead_code_eliminate
        |   |  |   |
        |   |  |   `-- optimization pass name
        |   |  |
        |   |  `-- optimization pass number in the loop
        |   |
        |   `-- optimization loop interation
        |
        `-- shader program number

Note that with INTEL_DEBUG=optimizer, we disable compact_virtual_grfs,
so that we can diff instruction lists across loop interations without
the register numbers being changes.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs.cpp