| 68 | static shape to_scalar(const shape& s) { return shape{s.type()}; } |
| 69 | |
| 70 | static bool is_dead(instruction_ref ins) |
| 71 | { |
| 72 | if(ins->name() == "@return") |
| 73 | return false; |
| 74 | if(ins->outputs().empty()) |
| 75 | return true; |
| 76 | if(ins->name() != "pointwise") |
| 77 | return false; |
| 78 | return ends_with(ins->module_inputs().front()->name(), "-deleted"); |
| 79 | } |
| 80 | |
| 81 | // We dont want to consider the `extra` instruction as dead as it might be an implicit return |
| 82 | static bool is_used_once(instruction_ref ins, instruction_ref* extra = nullptr) |
no test coverage detected