Commit 4a535604 authored by Paul's avatar Paul
Browse files

Formatting

parent f1f9770b
...@@ -42,7 +42,8 @@ void dead_code_elimination::apply(program& p) const ...@@ -42,7 +42,8 @@ void dead_code_elimination::apply(program& p) const
if(i == last) if(i == last)
break; break;
// Skip instruction with empty shape as output unless its a builtin or undefined or identity // Skip instruction with empty shape as output unless its a builtin or undefined or identity
if(i->get_shape().elements() == 0 and i->name().front() != '@' and i->name() != "undefined" and i->name() != "identity") if(i->get_shape().elements() == 0 and i->name().front() != '@' and
i->name() != "undefined" and i->name() != "identity")
continue; continue;
assert(bidistance(p, i, last) > 0); assert(bidistance(p, i, last) > 0);
fix([&](auto self, auto leaf) { fix([&](auto self, auto leaf) {
......
...@@ -276,10 +276,15 @@ struct stream_info ...@@ -276,10 +276,15 @@ struct stream_info
result[merge].resize(stream + 1); result[merge].resize(stream + 1);
auto&& r = result[merge][stream]; auto&& r = result[merge][stream];
r.push_back(ins); r.push_back(ins);
// Copy inputs if they dont have a stream(and are not a builtin and context free) // Copy inputs if they dont have a stream(and are not a builtin and context
// Inputs without a stream can have a implicit dependency // free) Inputs without a stream can have a implicit dependency
std::copy_if(ins->inputs().begin(), ins->inputs().end(), std::back_inserter(r), [&](auto x) { std::copy_if(ins->inputs().begin(),
return not this->has_stream(x) and not is_context_free(x->get_operator()) and x->name().front() != '@'; ins->inputs().end(),
std::back_inserter(r),
[&](auto x) {
return not this->has_stream(x) and
not is_context_free(x->get_operator()) and
x->name().front() != '@';
}); });
} }
} }
......
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