*
* This is used for breaking down matrix operations, where it's easier to
* create a temporary and work on each of its vector components individually.
- *
- * It is also used for automatic function inlining, where we want to take
- * an expression containing a call and move the call out to its own
- * assignment so that we can inline it at the appropriate place in the
- * instruction stream.
*/
#include "ir.h"
-#include "ir_visitor.h"
#include "ir_rvalue_visitor.h"
#include "ir_expression_flattening.h"
-#include "glsl_types.h"
class ir_expression_flattening_visitor : public ir_rvalue_visitor {
public:
{
ir_expression_flattening_visitor v(predicate);
- foreach_iter(exec_list_iterator, iter, *instructions) {
- ir_instruction *ir = (ir_instruction *)iter.get();
-
+ foreach_in_list(ir_instruction, ir, instructions) {
ir->accept(&v);
}
}