Commit dd9ff577 authored by Paul's avatar Paul
Browse files

Formatting

parent 299b33d1
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
namespace migraph { namespace migraph {
template<class Range> template <class Range>
void cse_range(program& p, Range&& r) void cse_range(program& p, Range&& r)
{ {
std::unordered_multimap<std::string, instruction_ref> instructions; std::unordered_multimap<std::string, instruction_ref> instructions;
...@@ -18,7 +18,7 @@ void cse_range(program& p, Range&& r) ...@@ -18,7 +18,7 @@ void cse_range(program& p, Range&& r)
continue; continue;
// Find instruction with the same name // Find instruction with the same name
auto found_instructions = range(instructions.equal_range(ins->name())); auto found_instructions = range(instructions.equal_range(ins->name()));
for(auto pp:found_instructions) for(auto pp : found_instructions)
{ {
auto eq = pp.second; auto eq = pp.second;
if(*eq != *ins) if(*eq != *ins)
...@@ -30,9 +30,6 @@ void cse_range(program& p, Range&& r) ...@@ -30,9 +30,6 @@ void cse_range(program& p, Range&& r)
} }
} }
void common_subexpression_elimination::apply(program& p) const void common_subexpression_elimination::apply(program& p) const { cse_range(p, iterator_for(p)); }
{
cse_range(p, iterator_for(p));
}
} // namespace migraph } // namespace migraph
...@@ -96,7 +96,7 @@ const std::vector<instruction_ref>& instruction::outputs() const { return output ...@@ -96,7 +96,7 @@ const std::vector<instruction_ref>& instruction::outputs() const { return output
bool operator==(const instruction& x, const instruction& y) bool operator==(const instruction& x, const instruction& y)
{ {
if(not (x.result == y.result and x.op == y.op and x.arguments == y.arguments)) if(not(x.result == y.result and x.op == y.op and x.arguments == y.arguments))
return false; return false;
if(x.name() == "@literal") if(x.name() == "@literal")
return x.lit == y.lit; return x.lit == y.lit;
......
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