public:
ir_constant_folding_visitor()
{
- /* empty */
+ this->progress = false;
}
virtual ~ir_constant_folding_visitor()
/*@}*/
void fold_constant(ir_rvalue **rvalue);
+
+ bool progress;
};
void
ir_constant *constant = (*rvalue)->constant_expression_value();
if (constant) {
*rvalue = constant;
+ this->progress = true;
} else {
(*rvalue)->accept(this);
}
else
ir->remove();
}
+ this->progress = true;
}
}
visit_exec_list(instructions, &constant_folding);
- /* FINISHME: Return real progress. */
- return false;
+ return constant_folding.progress;
}