Commit 3591803e authored by Ted Themistokleous's avatar Ted Themistokleous
Browse files

Rename trace_mod param to trace_pass

More representative naming for what this trace flag does
parent 57ee17f7
...@@ -374,7 +374,7 @@ MIGRAPHX_DECLARE_ENV_VAR(MIGRAPHX_VALIDATE_MATCHES) ...@@ -374,7 +374,7 @@ MIGRAPHX_DECLARE_ENV_VAR(MIGRAPHX_VALIDATE_MATCHES)
/// Find matches for an instruction in the module for per section of matchers /// Find matches for an instruction in the module for per section of matchers
template <class Mod, class... Ms> template <class Mod, class... Ms>
void find_matches(size_t trace_mod, Mod& mod, instruction_ref ins, Ms&&... ms) void find_matches(size_t trace_pass, Mod& mod, instruction_ref ins, Ms&&... ms)
{ {
#if !defined(__GNUC__) || defined(__clang__) || __GNUC__ > 5 #if !defined(__GNUC__) || defined(__clang__) || __GNUC__ > 5
const const
...@@ -389,12 +389,12 @@ void find_matches(size_t trace_mod, Mod& mod, instruction_ref ins, Ms&&... ms) ...@@ -389,12 +389,12 @@ void find_matches(size_t trace_mod, Mod& mod, instruction_ref ins, Ms&&... ms)
[&](auto&& m) { [&](auto&& m) {
if(match) if(match)
return; return;
if(trace > 1 or trace_mod > 1) if(trace > 1 or trace_pass > 1)
std::cout << "Match: " << get_type_name(m) << std::endl; std::cout << "Match: " << get_type_name(m) << std::endl;
auto r = match_instruction(get_module(mod), ins, m.matcher()); auto r = match_instruction(get_module(mod), ins, m.matcher());
if(r.result == get_module(mod).end()) if(r.result == get_module(mod).end())
return; return;
if(trace > 0 or trace_mod > 0) if(trace > 0 or trace_pass > 0)
{ {
std::cout << "Matched by " << get_type_name(m) << std::endl; std::cout << "Matched by " << get_type_name(m) << std::endl;
get_module(mod).debug_print(ins); get_module(mod).debug_print(ins);
...@@ -428,13 +428,13 @@ void find_matches(Mod& mod, Ms&&... ms) ...@@ -428,13 +428,13 @@ void find_matches(Mod& mod, Ms&&... ms)
} }
} }
/// Find matches in a module /// Find matches in a pass
template <class Mod, class... Ms> template <class Mod, class... Ms>
void find_matches(size_t trace_mod, Mod& mod, Ms&&... ms) void find_matches(size_t trace_pass, Mod& mod, Ms&&... ms)
{ {
for(auto ins : iterator_for(get_module(mod))) for(auto ins : iterator_for(get_module(mod)))
{ {
find_matches(trace_mod, mod, ins, ms...); find_matches(trace_pass, mod, ins, ms...);
} }
} }
......
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