mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-27 05:40:06 +00:00
9de4e69856
Create aggressive dead code elimination pass This pass eliminates unused code from functions. In addition, it detects and eliminates code which may have spurious uses but which do not contribute to the output of the function. The most common cause of such code sequences is summations in loops whose result is no longer used due to dead code elimination. This optimization has additional compile time cost over standard dead code elimination. This pass only processes entry point functions. It also only processes shaders with logical addressing. It currently will not process functions with function calls. It currently only supports the GLSL.std.450 extended instruction set. It currently does not support any extensions. This pass will be made more effective by first running passes that remove dead control flow and inlines function calls. This pass can be especially useful after running Local Access Chain Conversion, which tends to cause cycles of dead code to be left after Store/Load elimination passes are completed. These cycles cannot be eliminated with standard dead code elimination. Additionally: This transform uses a whitelist of instructions that it knows do have side effects, (a.k.a. combinators). It assumes other instructions have side effects: it will not remove them, and assumes they have side effects via their ID operands. |
||
---|---|---|
.. | ||
libspirv.h | ||
libspirv.hpp | ||
markv.h | ||
optimizer.hpp |