In the process of doing other things, dead code elimination got in my way. So I killed it.
The new dead code elimination pass uses the liveout set from dataflow analysis to remove dead instructions. Neither of the two old passes could, for instance remove a dead write if it was later overwritten unconditionally in a different block: mov vgrf4, 0.0 if ... endif mov vgrf4, vgrf5 The new pass handles everything the other two passes did and more. It also speeds up compile times. Check patch 1's commit summary for neat stats. Matt Turner (3): i965/fs: Reimplement dead_code_elimination(). i965/fs: Clear variable from live-set if it's completely overwritten. i965/fs: Remove dead_code_eliminate_local(). src/mesa/drivers/dri/i965/Makefile.sources | 1 + src/mesa/drivers/dri/i965/brw_fs.cpp | 215 +-------------------- src/mesa/drivers/dri/i965/brw_fs.h | 1 - .../dri/i965/brw_fs_dead_code_eliminate.cpp | 116 +++++++++++ 4 files changed, 118 insertions(+), 215 deletions(-) create mode 100644 src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp -- 1.8.3.2 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev