summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ir_constant_variable: New pass to mark constant-assigned variables constant.Eric Anholt2010-06-015-0/+262
| | | | | | This removes a bunch of gratuitous moving around of constant values from constructors. Makes a shader ir I was looking at for structure handling almost readable.
* ir_constant_folding: Look at instructions in functions.Eric Anholt2010-06-011-1/+4
| | | | This was broken in the ir_label -> ir_function rework.
* ir_swizzle_swizzle: Reduce swizzle chains to a single swizzle.Eric Anholt2010-06-014-0/+100
|
* ir_vec_index_to_swizzle: Pass to convert indexing of vectors to swizzles.Eric Anholt2010-06-015-2/+176
| | | | | This should remove the burden of handling constant vector indexing well from backend codegen, and could help with swizzle optimizations.
* ir_expression_flattening: Handle flattening values out of swizzles, too.Eric Anholt2010-06-011-12/+30
| | | | Fixes an uninlined normalize() in CorrectSwizzle2.vert.
* ir_expression_flattening: Fix breakage from hierarchichal visitor.Eric Anholt2010-06-011-0/+30
| | | | | | | | | 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.
* Reimplement ir_function_inlining_visitor using ir_hierarchical_vistorIan Romanick2010-05-261-139/+43
|
* Reimplement ir_copy_propagation_visitor using ir_hierarchical_vistorIan Romanick2010-05-261-105/+45
|
* Reimplement ir_expression_flattening_visitor using ir_hierarchical_vistorIan Romanick2010-05-261-115/+19
|
* ir_reader: Read record_refs.Kenneth Graunke2010-05-262-3/+19
| | | | Also changes the print visitor to not emit extraneous parenthesis.
* ir_reader: Fix reading of array deferences and correct error messages.Kenneth Graunke2010-05-261-26/+18
| | | | | | | | | 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.
* Fix setting the maximum accessed array elementIan Romanick2010-05-261-2/+8
| | | | | | 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.
* ir_dereference::mode is no longer used, kill with fireIan Romanick2010-05-262-18/+0
|
* Refactor whole-variable assigment checking into member functionIan Romanick2010-05-263-16/+34
|
* Refactor ir_dereference data fields to subclassesIan Romanick2010-05-2611-57/+58
|
* Replace open coded deref navigation with hierarchical visitorsIan Romanick2010-05-261-22/+26
|
* Refactor ir_dereference support for ir_visitorIan Romanick2010-05-269-106/+178
| | | | | Move the accept method for visitors from ir_dereference to the derived classes.
* Refactor ir_dereference support for ir_hierarchical_visitorIan Romanick2010-05-266-43/+83
| | | | | | 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.
* Begin refactoring ir_dereferenceIan Romanick2010-05-269-142/+177
| | | | | | | | | | | 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.
* Use ir_rvalue::variable_referenced instead of open coding itIan Romanick2010-05-181-21/+1
|
* ir_visit_tree is no longer used, remove ir_visit_tree.{cpp,h}Ian Romanick2010-05-173-237/+0
|
* Reimplement kill_for_derefs using ir_hierarchical_vistorIan Romanick2010-05-171-26/+26
| | | | The output of all test cases was verified to be the same using diff.
* Reimplement has_call_callback using ir_hierarchical_vistorIan Romanick2010-05-171-11/+18
| | | | | | | 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.
* Reimplement ir_if_simplicifation_visitor using ir_hierarchical_vistorIan Romanick2010-05-171-178/+32
| | | | The output of all test cases was verified to be the same using diff.
* Make visit_list_elements safe against node removalsIan Romanick2010-05-171-4/+16
|
* Reimplement ir_function_can_inline_visitor using ir_hierarchical_vistorIan Romanick2010-05-171-147/+16
| | | | The output of all test cases was verified to be the same using diff.
* Reimplement ir_dead_code_visitor using ir_hierarchical_vistorIan Romanick2010-05-171-131/+62
| | | | The output of all test cases was verified to be the same using diff.
* Add ir_hierarchical_visitor base class and associated infrastructureIan Romanick2010-05-175-1/+615
| | | | | This type of visitor should eventually replace all or almost all current uses of ir_visitor.
* Replace find_dead_code with visit_exec_listIan Romanick2010-05-171-14/+5
| | | | | find_dead_code appears to be an open-coded version of visit_exec_list that was implemented first.
* Use ir_rvalue::variable_referenced instead of open-coding itIan Romanick2010-05-141-25/+7
|
* Add ir_rvalue::variable_referencedIan Romanick2010-05-142-0/+53
|
* Refresh autogenerated builtin_function.cpp.Kenneth Graunke2010-05-141-144/+654
|
* Implement "tan" builtin.Kenneth Graunke2010-05-141-0/+21
|
* Implement "sin" and "cos" builtins via new expression operators.Kenneth Graunke2010-05-144-0/+55
|
* Implement "cross" builtin.Kenneth Graunke2010-05-141-0/+17
|
* Implement "fract" builtin.Kenneth Graunke2010-05-141-0/+34
|
* Implement "sign" builtin via a new expression operator.Kenneth Graunke2010-05-144-0/+71
|
* Implement "smoothstep" builtin.Kenneth Graunke2010-05-141-0/+224
|
* Implement "step" builtin.Kenneth Graunke2010-05-141-0/+68
|
* Integrate generate_builtins.pl into the build process.Kenneth Graunke2010-05-141-0/+2
| | | | | make will now regenerate builtin_function.cpp whenever you change/add/remove files in the builtins/* folders.
* Replace old builtin_function.cpp with new autogenerated one.Kenneth Graunke2010-05-141-778/+1226
|
* Add a perl script to generate builtin_function.cpp.Kenneth Graunke2010-05-141-0/+108
| | | | Usage: ./builtins/tools/generate_builtins.pl > builtin_function.cpp
* Fix bogus expression typing in various builtins.Kenneth Graunke2010-05-1411-144/+144
|
* Initial commit of IR for builtins.Kenneth Graunke2010-05-1435-0/+1056
| | | | | These were all generated by Eric's existing builtin_functions.cpp; I split the uvec* signatures out of 110 into the 130 folder.
* ir_reader: Set function signatures as defined.Kenneth Graunke2010-05-141-0/+1
|
* FS gl_FragCoord and and gl_FrontFacing are FS ins, not outs.Eric Anholt2010-05-141-2/+2
|
* Fix function call parameter printer to omit extraneous leading commaIan Romanick2010-05-141-1/+2
| | | | The output of all test cases was verified to be the same using diff.
* Replace many uses of foreach_list with foreach_list_typedIan Romanick2010-05-101-24/+11
|
* exec_list: Add foreach_list_typed and foreach_list_typed_constIan Romanick2010-05-101-0/+12
| | | | | | 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.
* Convert ast_node use of simple_node to exec_list and exec_nodeIan Romanick2010-05-106-158/+111
|