void FunctionInliner::apply(Stage &stage)
{
inlineable = InlineableFunctionLocator().apply(stage);
- visit(stage.content);
+ stage.content.visit(*this);
}
void FunctionInliner::visit_and_inline(RefPtr<Expression> &ptr)
void ConstantConditionEliminator::apply(Stage &stage)
{
- visit(stage.content);
+ stage.content.visit(*this);
NodeRemover().apply(stage, nodes_to_remove);
}
bool UnusedVariableRemover::apply(Stage &stage)
{
variables.push_back(BlockVariableMap());
- visit(stage.content);
+ stage.content.visit(*this);
BlockVariableMap &global_variables = variables.back();
for(BlockVariableMap::iterator i=global_variables.begin(); i!=global_variables.end(); ++i)
{
bool UnusedFunctionRemover::apply(Stage &stage)
{
- visit(stage.content);
+ stage.content.visit(*this);
NodeRemover().apply(stage, unused_nodes);
return !unused_nodes.empty();
}