]> git.tdb.fi Git - libs/gl.git/commit
Redesign ExpressionInliner
authorMikko Rasa <tdb@tdb.fi>
Thu, 22 Apr 2021 12:10:21 +0000 (15:10 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 22 Apr 2021 12:16:23 +0000 (15:16 +0300)
commit7fd67c4a1ed1c04b09c4bf58489a34809017ba8b
tree2b397f559448f5b07b1cbfaac72d656b9a8ee7b4
parentd4257f651ab8341d926d97d5c85d72ce64f8778b
Redesign ExpressionInliner

Similarly to the rewrite of UnusedVariableRemover from d230392, it now
analyzes the entire stage before inlining anything.  This approach is
more robust and easier to debug.

The inliner can now inline into the right side of an assignment even if
the left side references the same variable.
source/glsl/optimize.cpp
source/glsl/optimize.h
tests/glsl/binary_operators.glsl
tests/glsl/unary_operators.glsl