Commit 8423d683 authored by Paul's avatar Paul
Browse files

Format

parent 7da12e6e
......@@ -218,13 +218,14 @@ struct find_pointwise_reduce
struct find_reduce_pointwise
{
template<class... Ms>
template <class... Ms>
static auto match_broadcast(Ms... ms)
{
return match::skip(match::name("contiguous"))(match::name("multibroadcast")(match::arg(0)(ms...)).bind("broadcast"));
return match::skip(match::name("contiguous"))(
match::name("multibroadcast")(match::arg(0)(ms...)).bind("broadcast"));
}
template<class... Ms>
template <class... Ms>
static auto any_input(Ms... ms)
{
return match::any_of[match::inputs()](match::any(ms...).bind("input"));
......@@ -283,7 +284,7 @@ struct find_reduce_reduce
auto reduce1 = r.result;
auto reduce2 = r.instructions["reduce"];
if (reduce1->get_operator() != reduce2->get_operator())
if(reduce1->get_operator() != reduce2->get_operator())
return;
const auto* rm1 = reduce1->module_inputs().front();
......@@ -310,9 +311,10 @@ void fuse_reduce::apply(module_pass_manager& mpm) const
{
create_reduce_modules(mpm);
mpm.run_pass(dead_code_elimination{});
for(int i=0;i<4;i++)
for(int i = 0; i < 4; i++)
{
match::find_matches(mpm, find_reduce_pointwise{}, find_pointwise_reduce{}, find_reduce_reduce{});
match::find_matches(
mpm, find_reduce_pointwise{}, find_pointwise_reduce{}, find_reduce_reduce{});
mpm.run_pass(dead_code_elimination{});
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment