337d9c955b070224f7278524af54ddacd8bb0f17 |
|
30-May-2012 |
Eric Anholt <eric@anholt.net> |
glsl: Put a bunch of optimization visitors under anonymous namespaces. Because these classes are used entirely from their own source files and not from separate DSOs, the linker gets to produce massively less code. This cuts about 13k of text in the libdricore case. In the non-libdricore case, the additional linkage information allows the compiler to inline some code, so libglsl.a size actually increases by about 300 bytes. For a dricore build, improves shader_runner runtime on glsl-fs-copy-propagation-texcoords-1 by 0.21% +/- 0.03% (n=353574, outliers removed). No statistically significant difference with n=322 on glslparsertest on a yofrankie shader intended to test compiler performance. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/glsl/opt_function_inlining.cpp
|
d884f60861f270cdcf7d9d47765efcf1e1de30b6 |
|
20-Mar-2012 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Convert ir_call to be a statement rather than a value. Aside from ir_call, our IR is cleanly split into two classes: - Statements (typeless; used for side effects, control flow) - Values (deeply nestable, pure, typed expression trees) Unfortunately, ir_call confused all this: - For void functions, we placed ir_call directly in the instruction stream, treating it as an untyped statement. Yet, it was a subclass of ir_rvalue, and no other ir_rvalue could be used in this way. - For functions with a return value, ir_call could be placed in arbitrary expression trees. While this fit naturally with the source language, it meant that expressions might not be pure, making it difficult to transform and optimize them. To combat this, we always emitted ir_call directly in the RHS of an ir_assignment, only using a temporary variable in expression trees. Many passes relied on this assumption; the acos and atan built-ins violated it. This patch makes ir_call a statement (ir_instruction) rather than a value (ir_rvalue). Non-void calls now take a ir_dereference of a variable, and store the return value there---effectively a call and assignment rolled into one. They cannot be embedded in expressions. All expression trees are now pure, without exception. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/glsl/opt_function_inlining.cpp
|
af962e11830db02f4f33a69219155d1ddb7c04d0 |
|
05-Oct-2011 |
Stéphane Marchesin <marcheu@chromium.org> |
glsl: Remove unneeded headers.
/external/mesa3d/src/glsl/opt_function_inlining.cpp
|
bdb6a6ef83af62f2eda692d91ee2476c3fd1ce3a |
|
08-Mar-2011 |
Ian Romanick <ian.d.romanick@intel.com> |
glsl: Use insert_before for lists instead of open coding it
/external/mesa3d/src/glsl/opt_function_inlining.cpp
|
2df56b002dcc5d7e91515bd0ca741677f0172b38 |
|
08-Mar-2011 |
Ian Romanick <ian.d.romanick@intel.com> |
glsl: Function signatures cannot have NULL return type The return type can be void, and this is the case where a `_ret_val' variable should not be declared.
/external/mesa3d/src/glsl/opt_function_inlining.cpp
|
819d57fce94b20fa0d34da6f037f0a53c4a5bdc2 |
|
13-Jan-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Introduce a new "const_in" variable mode. This annotation is for an "in" function parameter for which it is only legal to pass constant expressions. The only known example of this, currently, is the textureOffset functions. This should never be used for globals.
/external/mesa3d/src/glsl/opt_function_inlining.cpp
|
d3073f58c17d8675a2ecdd5dfa83e5520c78e1a8 |
|
21-Jan-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
Convert everything from the talloc API to the ralloc API.
/external/mesa3d/src/glsl/opt_function_inlining.cpp
|
df883eb1575a740bf91e01cbe2eaa4dbc1f9f154 |
|
17-Nov-2010 |
Chad Versace <chad.versace@intel.com> |
glsl: Fix Doxygen tag \file in recently renamed files
/external/mesa3d/src/glsl/opt_function_inlining.cpp
|
32aaf89823de11e98cb59d5ec78c66cd3e74bcd4 |
|
15-Nov-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Rename various ir_* files to lower_* and opt_*. This helps distinguish between lowering passes, optimization passes, and other compiler code.
/external/mesa3d/src/glsl/opt_function_inlining.cpp
|