On 22 January 2014 09:16, Connor Abbott <cwabbo...@gmail.com> wrote: > This series enables GLSL IR support for SSA, including passes to convert > to and from SSA form. SSA is a form of the intermediate representation > of a compiler in which each variable is assigned exactly once. SSA form > makes many optimizations faster and easier to write, and enables other > more powerful optimizations. SSA is used in GCC [1] and LLVM [2] as well > as various compiler backends within Mesa itself, such as r600g-sb and > Nouveau. Adding support for SSA will allow the various optimizations > these backends perform to be implemented in one place, instead of > making each driver reinvent the wheel (as several have already done). > Additionally, all new backends would recieve these optimizations, > reducing the burden of writing a compiler backend for a new driver. > > Even though no optimization passes are now implemented, I am putting out > this series to solicit feedback on the design, to make sure I don't have > to rewrite things before I go ahead and write these new passes. > > There are no piglit regressions on Softpipe, except for the > spec/OpenGL 2.0/max-samplers test, which only passed before because the > compiler happened to unroll the loop; the extra copies caused by the > conversion to and from SSA stop the compiler from unrolling, meaning > that the resulting GLSL IR code contains an indirect sampler index which > glsl-to-tgsi can't handle. >
I had a detailed look at your patches and I really like where you're going with this. I sent a lot of feedback in response to patches 4, 5, 7, 9, and 10; I don't think any of my feedback would require a major change to your overall plan. Nice work! Consider patches 1, 2, 3, 6, 8, and 11: Reviewed-by: Paul Berry <stereotype...@gmail.com> Note, however, that probably patch 11 should be postponed until we've written something that makes use of the SSA form (i.e. the GVN-GCM algorithm you mentioned, or a direct conversion from GLSL IR to an SSA backend).
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev