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_dead_functions.cpp
|
e372aa69494469d6c43c315b5c39355dece65dcf |
|
27-Apr-2012 |
Vinson Lee <vlee@freedesktop.org> |
glsl: Remove unused member predicate from ir_dead_functions_visitor. Fix uninitialized pointer field defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/glsl/opt_dead_functions.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_dead_functions.cpp
|
482338842db6ad387316b52fbe9602eee56ad082 |
|
01-Aug-2011 |
Paul Berry <stereotype441@gmail.com> |
Revert "glsl: Skip processing the first function's body in do_dead_functions()." opt_dead_functions contained a shortcut to skip processing the first function's body, based on the assumption that IR functions are topologically sorted, with callees always coming before their callers (therefore the first function cannot contain any calls). This assumption turns out not to be true in general. For example, the following code snippet gets translated to IR that violates this assumption: void f(); void g(); void f() { g(); } void g() { ... } In practice, the shortcut didn't cause bugs because of a coincidence of the circumstances in which opt_dead_functions is called: (a) we do inlining right before dead function elimination, and inlining (when successful) eliminates all calls. (b) for user-defined functions, inlining is always successful, because previous optimization passes (during compilation) have reduced them to a form that is eligible for inlining. (c) the function that appears first in the IR can't possibly call a built-in function, because built-in functions are always emitted before the function that calls them. It seems unnecessarily fragile to have opt_dead_functions depend on these coincidences. And the next patch in this series will break (c). So I'm reverting the shortcut. The consequence will be a slight increase in link time for complex shaders. This reverts commit c75427f4c8767e131e5fb3de44fbc9d904cb992d. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/glsl/opt_dead_functions.cpp
|
c75427f4c8767e131e5fb3de44fbc9d904cb992d |
|
11-Mar-2011 |
Eric Anholt <eric@anholt.net> |
glsl: Skip processing the first function's body in do_dead_functions(). It can't call anything, so there's no point.
/external/mesa3d/src/glsl/opt_dead_functions.cpp
|
11af045ea8080435de0be74d8765190287b64f8b |
|
11-Mar-2011 |
Eric Anholt <eric@anholt.net> |
glsl: Whitespace fixup in opt_dead_functions.cpp.
/external/mesa3d/src/glsl/opt_dead_functions.cpp
|
497baf4e4a6a0a2f247c7bfb9bf69a2b93c2c19f |
|
10-Feb-2011 |
Ian Romanick <ian.d.romanick@intel.com> |
Use C-style system headers in C++ code to avoid issues with std:: namespace
/external/mesa3d/src/glsl/opt_dead_functions.cpp
|
61c59234f916406512b3591f46599cc29a5d8e23 |
|
04-Feb-2011 |
Vinson Lee <vlee@vmware.com> |
glsl: Add using statements for standard library functions. Standard library functions in C++ are in the std namespace. When using C++-style header files for the standard library, some compilers, such as Sun Studio, provide symbols only for the std namespace and not for the global namespace. This patch adds using statements for standard library functions. Another option could have been to prepend standard library function calls with 'std::'. This patch fixes several compilation errors with Sun Studio.
/external/mesa3d/src/glsl/opt_dead_functions.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_dead_functions.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_dead_functions.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_dead_functions.cpp
|