| 52 | }; |
| 53 | |
| 54 | static std::string encode(const std::string& s) |
| 55 | { |
| 56 | std::stringstream ss; |
| 57 | bool prespace = false; |
| 58 | for(auto c : s) |
| 59 | { |
| 60 | if(std::isspace(c) != 0) |
| 61 | { |
| 62 | if(not prespace) |
| 63 | ss << " "; |
| 64 | prespace = true; |
| 65 | } |
| 66 | else if(std::isprint(c) != 0) |
| 67 | { |
| 68 | ss << c; |
| 69 | prespace = false; |
| 70 | } |
| 71 | } |
| 72 | return migraphx::trim(ss.str()); |
| 73 | } |
| 74 | |
| 75 | static migraphx::module create_mlir_submodule(const migraphx::module& mmlir) |
| 76 | { |