summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-06-01ir_swizzle_swizzle: Reduce swizzle chains to a single swizzle.Eric Anholt
2010-06-01ir_vec_index_to_swizzle: Pass to convert indexing of vectors to swizzles.Eric Anholt
This should remove the burden of handling constant vector indexing well from backend codegen, and could help with swizzle optimizations.
2010-06-01ir_expression_flattening: Handle flattening values out of swizzles, too.Eric Anholt
Fixes an uninlined normalize() in CorrectSwizzle2.vert.
2010-06-01ir_expression_flattening: Fix breakage from hierarchichal visitor.Eric Anholt
Similar to other situations where the visitor pattern doesn't fit, in this case we need the pointer to the base instruction in the instruction stream for where to insert any new instructions we generate (not the instruction in the tree we're looking at). By removing the code for setting the base_ir, flattened expressions would end up, for example, before the function definition where they had appeared.
2010-05-26Reimplement ir_function_inlining_visitor using ir_hierarchical_vistorIan Romanick
2010-05-26Reimplement ir_copy_propagation_visitor using ir_hierarchical_vistorIan Romanick
2010-05-26Reimplement ir_expression_flattening_visitor using ir_hierarchical_vistorIan Romanick
2010-05-26ir_reader: Read record_refs.Kenneth Graunke
Also changes the print visitor to not emit extraneous parenthesis.
2010-05-26ir_reader: Fix reading of array deferences and correct error messages.Kenneth Graunke
Previously, the syntax was (array_ref <variable name> <index>), but the subject is now a general rvalue (not a name). In particular, it might be a (var_ref ...). Also, remove "expected ... or (swiz)" from error messages; swiz is not allowed inside a var_ref.
2010-05-26Fix setting the maximum accessed array elementIan Romanick
Array dereferences now point to variable dereferences instead of pointing directly to variables. This necessitated some changes to the way the variable is accessed when setting the maximum index array element.
2010-05-26ir_dereference::mode is no longer used, kill with fireIan Romanick
2010-05-26Refactor whole-variable assigment checking into member functionIan Romanick
2010-05-26Refactor ir_dereference data fields to subclassesIan Romanick
2010-05-26Replace open coded deref navigation with hierarchical visitorsIan Romanick
2010-05-26Refactor ir_dereference support for ir_visitorIan Romanick
Move the accept method for visitors from ir_dereference to the derived classes.
2010-05-26Refactor ir_dereference support for ir_hierarchical_visitorIan Romanick
Move the accept method for hierarchical visitors from ir_dereference to the derived classes. This was mostly straight-forward, but I suspect that ir_dead_code_local may be broken now.
2010-05-26Begin refactoring ir_dereferenceIan Romanick
Create separate subclasses of ir_dereference for variable, array, and record dereferences. As a side effect, array and record dereferences no longer point to ir_variable objects directly. Instead they each point to an ir_dereference_variable object. This is the first of several steps in the refactoring process. The intention is that ir_dereference will eventually become an abstract base class.
2010-05-18Use ir_rvalue::variable_referenced instead of open coding itIan Romanick
2010-05-17ir_visit_tree is no longer used, remove ir_visit_tree.{cpp,h}Ian Romanick
2010-05-17Reimplement kill_for_derefs using ir_hierarchical_vistorIan Romanick
The output of all test cases was verified to be the same using diff.
2010-05-17Reimplement has_call_callback using ir_hierarchical_vistorIan Romanick
This has the added advantage that it will stop traversing the tree as soon as the first call is found. The output of all test cases was verified to be the same using diff.
2010-05-17Reimplement ir_if_simplicifation_visitor using ir_hierarchical_vistorIan Romanick
The output of all test cases was verified to be the same using diff.
2010-05-17Make visit_list_elements safe against node removalsIan Romanick
2010-05-17Reimplement ir_function_can_inline_visitor using ir_hierarchical_vistorIan Romanick
The output of all test cases was verified to be the same using diff.
2010-05-17Reimplement ir_dead_code_visitor using ir_hierarchical_vistorIan Romanick
The output of all test cases was verified to be the same using diff.
2010-05-17Add ir_hierarchical_visitor base class and associated infrastructureIan Romanick
This type of visitor should eventually replace all or almost all current uses of ir_visitor.
2010-05-17Replace find_dead_code with visit_exec_listIan Romanick
find_dead_code appears to be an open-coded version of visit_exec_list that was implemented first.
2010-05-14Use ir_rvalue::variable_referenced instead of open-coding itIan Romanick
2010-05-14Add ir_rvalue::variable_referencedIan Romanick
2010-05-14Refresh autogenerated builtin_function.cpp.Kenneth Graunke
2010-05-14Implement "tan" builtin.Kenneth Graunke
2010-05-14Implement "sin" and "cos" builtins via new expression operators.Kenneth Graunke
2010-05-14Implement "cross" builtin.Kenneth Graunke
2010-05-14Implement "fract" builtin.Kenneth Graunke
2010-05-14Implement "sign" builtin via a new expression operator.Kenneth Graunke
2010-05-14Implement "smoothstep" builtin.Kenneth Graunke
2010-05-14Implement "step" builtin.Kenneth Graunke
2010-05-14Integrate generate_builtins.pl into the build process.Kenneth Graunke
make will now regenerate builtin_function.cpp whenever you change/add/remove files in the builtins/* folders.
2010-05-14Replace old builtin_function.cpp with new autogenerated one.Kenneth Graunke
2010-05-14Add a perl script to generate builtin_function.cpp.Kenneth Graunke
Usage: ./builtins/tools/generate_builtins.pl > builtin_function.cpp
2010-05-14Fix bogus expression typing in various builtins.Kenneth Graunke
2010-05-14Initial commit of IR for builtins.Kenneth Graunke
These were all generated by Eric's existing builtin_functions.cpp; I split the uvec* signatures out of 110 into the 130 folder.
2010-05-14ir_reader: Set function signatures as defined.Kenneth Graunke
2010-05-14FS gl_FragCoord and and gl_FrontFacing are FS ins, not outs.Eric Anholt
2010-05-14Fix function call parameter printer to omit extraneous leading commaIan Romanick
The output of all test cases was verified to be the same using diff.
2010-05-10Replace many uses of foreach_list with foreach_list_typedIan Romanick
2010-05-10exec_list: Add foreach_list_typed and foreach_list_typed_constIan Romanick
These variations are parameterized by the type of the nodes in the list. This enables skipping the explicit usage of exec_node_data in the loop body.
2010-05-10Convert ast_node use of simple_node to exec_list and exec_nodeIan Romanick
2010-05-10exec_list: Add simpler exec_list for-each macrosIan Romanick
2010-05-10exec_list: Add macros to get ptr to structure containing a nodeIan Romanick
This has some ugly hackery to work-around C++ fail. I have emperically determined that it works in all the cases that matter.