| 833 | } |
| 834 | |
| 835 | static bool is_borrowed(instruction_ref ins) |
| 836 | { |
| 837 | auto aliases = instruction::get_output_alias(ins, true); |
| 838 | if(aliases.size() == 1 and aliases.front() == ins) |
| 839 | return false; |
| 840 | return std::any_of(aliases.begin(), aliases.end(), [](instruction_ref alias) { |
| 841 | lifetime l = alias->get_operator().get_lifetime(); |
| 842 | if(l == lifetime::borrow) |
| 843 | return true; |
| 844 | return is_borrowed(alias); |
| 845 | }); |
| 846 | } |
| 847 | |
| 848 | static bool is_global(instruction_ref ins) |
| 849 | { |
no test coverage detected