Kenneth Graunke
32aaf89823
glsl: Rename various ir_* files to lower_* and opt_*.
...
This helps distinguish between lowering passes, optimization passes, and
other compiler code.
2010-11-15 16:34:20 -08:00
Eric Anholt
7de4d8fe11
glsl: Don't dead-code eliminate a uniform initializer.
...
Partial fix for glsl-uniform-initializer-5.
2010-08-24 16:37:02 -07:00
Eric Anholt
0b09e6410f
glsl2: Fix copy'n'paste hilarity leading to leaking in the refcount visitor.
2010-08-18 14:16:07 -07:00
Brian Paul
9f9386d22a
glsl2: added casts to silence warnings
2010-08-11 15:06:13 -06:00
Eric Anholt
9f82806c7b
glsl2: Don't dead-code eliminate a call where the return value is unused.
...
This showed up since the disabling of inlining at compile time, which
I apparently didn't regenerate piglit summary for.
Fixes:
glsl-deadcode-call.
2010-08-05 12:56:03 -07:00
Eric Anholt
3bd7e70bf7
glsl2: Add some easy-to-enable debug printfs to ir_dead_code.cpp.
2010-08-05 12:56:02 -07:00
Eric Anholt
046bef2357
glsl2: Remove the shader_in/shader_out tracking separate from var->mode.
...
I introduced this for ir_dead_code to distinguish function parameter
outvals from varying outputs. Only, since ast_to_hir's
current_function is unset when setting up function parameters (they're
needed for making the function signature in the first place), all
function parameter outvals were marked as shader outputs anyway. This
meant that an inlined function's cloned outval was marked as a shader
output and couldn't be dead-code eliminated. Instead, since
ir_dead_code doesn't even look at function parameters, just use
var->mode.
The longest Mesa IR coming out of ir_to_mesa for Yo Frankie drops from
725 instructions to 636.
2010-08-04 20:52:33 -07:00
Eric Anholt
d72edc4ddd
glsl2: Factor out the variable refcounting part of ir_dead_code.cpp.
2010-07-31 15:52:21 -07:00
Eric Anholt
5532c4ca69
glsl2: Fix the linked version of ir_dead_code.
...
If we don't walk into functions, we won't see any usage of variables
in the functions.
2010-07-27 11:46:06 -07:00
Eric Anholt
66d4c65ee2
glsl2: Make the dead code handler make its own talloc context.
...
This way, we don't need to pass in a parse state, and the context
doesn't grow with the number of passes through optimization.
2010-07-27 11:46:05 -07:00
Eric Anholt
9acf618f24
glsl2: Remove dead member from dead code visitor.
2010-07-01 11:07:22 -07:00
Eric Anholt
bda27424cf
glsl2: Use the parser state as the talloc context for dead code elimination.
...
This cuts runtime by around 20% from talloc_parent() lookups.
2010-06-25 13:38:38 -07:00
Eric Anholt
2928588267
glsl2: Move the compiler to the subdirectory it will live in in Mesa.
2010-06-24 15:36:00 -07:00