Commit Graph

7 Commits

Author SHA1 Message Date
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