summaryrefslogtreecommitdiff
path: root/ir_function_inlining.cpp
AgeCommit message (Collapse)AuthorFilesLines
2010-06-23Add a virtual clone() method to ir_instruction.Eric Anholt1-280/+13
This will be used by function inlining, the linker, and avoiding double usage of the LHS deref chains in ++, *=, and similar operations.
2010-06-22Include stdio.h and stdlib.h everywhere, and don't cook our own #define NULL.Eric Anholt1-1/+0
2010-06-09ir_function_cloning_visitor: Add support for ir_texture.Kenneth Graunke1-2/+22
2010-06-09Add stub visitor support for ir_texture.Kenneth Graunke1-0/+18
2010-06-09Use array delete operator to delete an arrayIan Romanick1-1/+1
This was detected by valgrind. I think GCC still does the right thing, but the C++ spec allows the compiler to do something stupid... like crash or only delete the first entry in the array.
2010-05-26Reimplement ir_function_inlining_visitor using ir_hierarchical_vistorIan Romanick1-139/+43
2010-05-26Refactor ir_dereference data fields to subclassesIan Romanick1-7/+7
2010-05-26Refactor ir_dereference support for ir_visitorIan Romanick1-22/+40
Move the accept method for visitors from ir_dereference to the derived classes.
2010-05-26Begin refactoring ir_dereferenceIan Romanick1-19/+19
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-05Move optimization pass prototypes to a single header.Eric Anholt1-0/+36
2010-05-01Fix ir_return cloning to actually use the cloned subexpression.Kenneth Graunke1-2/+1
This caused a nasty bug where the function inliner would create new variables for each of the formal parameters, but the body would still reference the old copies. This was highly visible since the dead code eliminator (rightly) removed the new declarations, leading to printed IR that referenced non-existent variable names.
2010-04-30Fix incorrect comments in function inliner.Kenneth Graunke1-3/+3
2010-04-28ir_function_inlining: Handle inlining of structure dereferences.Eric Anholt1-2/+1
2010-04-28Correctly handle remapping of array dereferences if ->var is a variable.Eric Anholt1-20/+11
2010-04-23ir_function_inlining: Implement inlining in many more cases.Eric Anholt1-21/+11
We still don't inline for control flow in the inlined function, and we don't have any limits on what we will inline.
2010-04-23ir_function_inlining: Avoid NULL dereference on assignment conditions.Eric Anholt1-3/+5
2010-04-21Remove ir_label since it is no longer used.Kenneth Graunke1-14/+0
2010-04-21Refactor IR function representation.Kenneth Graunke1-1/+4
Now, ir_function is emitted as part of the IR instructions, rather than simply existing in the symbol table. Individual ir_function_signatures are not emitted themselves, but only as part of ir_function.
2010-04-16Add support for inlining calls done inside of expressions.Eric Anholt1-0/+14
2010-04-08Repeat the optimization passes until we stop making progress.Eric Anholt1-1/+1
2010-04-08Add inlining support for array dereferences.Eric Anholt1-1/+14
2010-04-08Inline functions consisting of a return of an expression.Eric Anholt1-0/+522