MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / is_borrowed

Function is_borrowed

src/module.cpp:835–846  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

833}
834
835static 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
848static bool is_global(instruction_ref ins)
849{

Callers 1

is_danglingFunction · 0.85

Calls 6

frontMethod · 0.80
any_ofFunction · 0.50
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
get_lifetimeMethod · 0.45

Tested by

no test coverage detected