Eric Anholt
e46a454305
ir: Give ir_instruction a print visitor helper.
...
This avoids spamming each file with includes of ir_print_visitor.h
because someone was doing debugging at some point, and is less typing
when doing debugging.
2010-06-22 18:18:30 -07:00
Eric Anholt
ac95f2f8c8
Include stdio.h and stdlib.h everywhere, and don't cook our own #define NULL.
2010-06-22 12:30:55 -07:00
Ian Romanick
2fd22486d4
Reimplement ir_copy_propagation_visitor using ir_hierarchical_vistor
2010-05-26 17:04:19 -07:00
Ian Romanick
b067db2e25
Refactor whole-variable assigment checking into member function
2010-05-26 15:23:25 -07:00
Ian Romanick
36ea28646c
Refactor ir_dereference data fields to subclasses
2010-05-26 15:23:25 -07:00
Ian Romanick
c7b1046a9f
Refactor ir_dereference support for ir_visitor
...
Move the accept method for visitors from ir_dereference to the derived
classes.
2010-05-26 15:23:25 -07:00
Ian Romanick
5d82e239f9
Use ir_rvalue::variable_referenced instead of open-coding it
2010-05-14 17:36:00 -07:00
Eric Anholt
bdd9b1f3ff
Move optimization pass prototypes to a single header.
2010-05-05 11:47:33 -07:00
Eric Anholt
aef0aaee67
ir_copy_propagation: Fix up the doxygen about the file.
2010-05-05 09:38:09 -07:00
Eric Anholt
8e75de3164
ir_copy_propagation: Return true if we optimized out any assignments.
...
This may trigger other optimization phases to make more progress themselves.
2010-05-05 09:32:44 -07:00
Eric Anholt
4e2c0b99d9
ir_copy_propagation: Handle swizzles and array derefs on LHS of assign.
...
This improves the ACP to not get cleared when more complicated assignments
occur, cleaning up more redundant copies in programs.
2010-05-05 09:27:50 -07:00
Eric Anholt
5c89f0ecb9
ir_copy_propagation: New pass to rewrite dereferences to avoid copies.
...
This is pretty basic. Right now it only handles pure assignments --
same type on each side, no swizzling, and only within basic blocks.
2010-05-04 17:00:42 -07:00