Matt Turner <matts...@gmail.com> writes: > total instructions in shared programs: 811813 -> 788004 (-2.93%) > instructions in affected programs: 185685 -> 161876 (-12.82%) > (this is only the .shader_test files. Our .vert files are useless) > > This series improves the dead code elimination pass in i965 > vec4 backend. A small overview of the patches: > > i965/vec4: Add missing doxygen close brace. > i965/vec4: Add and use vec4_instruction::writes_flag(). > i965/vec4: Rename depends_on_flags() to reads_flag(). > i965/vec4: Print the predicate in dump_instructions(). > i965/vec4: Add is_null() method to dst_reg. > i965/vec4: Preparatory clean up of dead_code_eliminate(). > > Clean ups and preparations. > > i965/vec4: Don't dead code eliminate instructions > > Remove the possibility of eliminating things that > weren't actually dead. > > i965/vec4: Track live ranges per-channel, not per vgrf. > i965/vec4: Let dead code eliminate trim dead channels. > > Perform dead code elimination on a per-channel basis. > > i965/vec4: Factor code out of DCE into a separate > i965/vec4: Eliminate writes that are never read. > > For each instruction, eliminate previous instructions > whose results this instruction overwrote before they > were read. > > i965/vec4: Eliminate dead writes to the flag register. > > Same thing, but for the flag register. > > The dead code elimination pass still has some limitations > and areas for improvement. I'm pretty sick of working on > this, so I'm not planning to do it anytime soon. Ideas: > > - Extend the pass to eliminate overwritten results in all > basic blocks (currently we only do it in the first block) > - Search instructions backwards, so that when we eliminate > dead writes we don't have to consider them again. > - Stop scanning backwards if we hit the beginning of the > destination's live range.
Yeah, a real dataflow analysis based DCE would be pretty cool, but this is a lot better than before. This series is: Reviewed-by: Eric Anholt <e...@anholt.net>
pgpOd8On_c8c5.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev