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

Function is_global

src/module.cpp:848–855  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

846}
847
848static bool is_global(instruction_ref ins)
849{
850 auto aliases = instruction::get_output_alias(ins);
851 return std::any_of(aliases.begin(), aliases.end(), [](instruction_ref alias) {
852 const auto& op = alias->get_operator();
853 return op.name() == "@param" or op.get_lifetime() == lifetime::global;
854 });
855}
856
857static bool is_dangling(instruction_ref ins) { return not is_global(ins) and is_borrowed(ins); }
858

Callers 1

is_danglingFunction · 0.85

Calls 5

any_ofFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
nameMethod · 0.45
get_lifetimeMethod · 0.45

Tested by

no test coverage detected