MCPcopy Create free account
hub / github.com/Samsung/UTopia / exist

Method exist

tests/rootdefanalysis/TestClass.cpp:76–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74 }
75
76 bool exist(const std::set<RDNode> &Nodes, std::string FuncName, unsigned BIdx,
77 unsigned IIdx, int OIdx) const {
78
79 auto *I = IRAH->getInstruction(FuncName, BIdx, IIdx);
80 if (!I)
81 return false;
82
83 for (auto &Node : Nodes) {
84 auto Def = Node.getDefinition();
85 if (Def.first != I || Def.second != OIdx)
86 continue;
87
88 return true;
89 }
90
91 return false;
92 }
93
94 /*
95 * To get a callbase instruction by given a function name, a basic block

Callers

nothing calls this directly

Calls 2

getInstructionMethod · 0.80
getDefinitionMethod · 0.80

Tested by

no test coverage detected