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_constant_folding.cpp
|
82065fa20ee3f2880a070f1f4f75509b910cedde |
|
21-Sep-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Remove ir_call::get_callee() and set_callee(). Previously, set_callee() performed some assertions about the type of the ir_call; protecting the bare pointer ensured these checks would be run. However, ir_call no longer has a type, so the getter and setter methods don't actually do anything useful. Remove them in favor of accessing callee directly, as is done with most other fields in our IR. 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_constant_folding.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_constant_folding.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_constant_folding.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_constant_folding.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_constant_folding.cpp
|