| 35 | inline namespace MIGRAPHX_INLINE_NS { |
| 36 | |
| 37 | void optimize_module::apply(module_pass_manager& mpm) const |
| 38 | { |
| 39 | mpm.get_module().repeat_while_changes(2, [&] { |
| 40 | // loop to further optimize after initial transformations |
| 41 | mpm.get_module().repeat_while_changes(4, [&] { |
| 42 | mpm.run_pass(simplify_reshapes{}); |
| 43 | mpm.run_pass(eliminate_convert{}); |
| 44 | mpm.run_pass(dead_code_elimination{}); |
| 45 | mpm.run_pass(simplify_algebra{}); |
| 46 | }); |
| 47 | mpm.run_pass(eliminate_common_subexpression{}); |
| 48 | mpm.run_pass(dead_code_elimination{}); |
| 49 | mpm.run_pass(propagate_constant{propagate_constant_skip_ops}); |
| 50 | mpm.run_pass(dead_code_elimination{}); |
| 51 | }); |
| 52 | } |
| 53 | |
| 54 | } // namespace MIGRAPHX_INLINE_NS |
| 55 | } // namespace migraphx |
nothing calls this directly
no test coverage detected