Commit Graph

15 Commits

Author SHA1 Message Date
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
Kenneth Graunke
26d74cd1d1 Add stub visitor support for ir_texture. 2010-06-09 11:14:57 -07:00
Eric Anholt
f389862006 ir_constant_folding: Look at instructions in functions.
This was broken in the ir_label -> ir_function rework.
2010-06-01 15:15:04 -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
Eric Anholt
bdd9b1f3ff Move optimization pass prototypes to a single header. 2010-05-05 11:47:33 -07:00
Kenneth Graunke
3289886688 Remove ir_label since it is no longer used. 2010-04-21 15:37:10 -07:00
Eric Anholt
894ea972a4 Put function bodies under function signatures, instead of flat in the parent.
This will let us know the length of function bodies for the purpose of
inlining (among other uses).
2010-04-07 17:23:23 -07:00
Ian Romanick
f8e31e00b1 Add ir_loop_jump to represent 'break' and 'continue' in loops 2010-04-07 11:42:30 -07:00
Ian Romanick
fad607a9be Add ir_loop to represent loops
This touches a lot of files because everything derived from ir_visitor
has to be updated.  This is the primary disadvantage of the visitor pattern.
2010-04-07 11:41:50 -07:00
Eric Anholt
70b74928a2 Make constant folding descend into if statements. 2010-04-06 11:52:09 -07:00
Eric Anholt
e5a9e70cde Descend down the tree in more locations in constant folding. 2010-04-06 11:42:34 -07:00
Eric Anholt
bae5be356e Perform constant folding on array indices.
Replaces a constant var deref with a constant value in CorrectParse1.frag.
2010-04-06 11:42:34 -07:00
Eric Anholt
3fff009af1 Fold constant expressions in if conditionals.
Fixes up 3 more expressions in CorrectParse2.frag.
2010-04-06 11:42:34 -07:00
Eric Anholt
62735694a1 Add a constant folding optimization pass. 2010-04-06 11:42:31 -07:00