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

Method traceLink

lib/rootdefanalysis/RDAnalyzer.cpp:360–380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

358}
359
360std::set<RDNode> RDAnalyzer::traceLink(RDNode &Node, Function &F) {
361 auto &Target = Node.getTarget().getIR();
362 if (!isa<GlobalVariable>(&Target))
363 return {Node};
364
365 std::set<RDNode> Result;
366 auto LeafMems = Space.nextInLink(F);
367
368 if (LeafMems.size() == 0) {
369 mergeRDNode(Result, Node);
370 return Result;
371 }
372 for (auto *Caller : LeafMems) {
373 RDNode NewNode(Node.getTarget().getIR(), *Caller, &Node);
374 for (auto &Found :
375 traverseFunction(NewNode, *Caller->getFunction(), true, true))
376 mergeRDNode(Result, Found);
377 }
378
379 return Result;
380}
381
382std::set<RDNode> RDAnalyzer::pass(RDNode &Node) {
383 if (Node.isRootDefinition())

Callers

nothing calls this directly

Calls 3

nextInLinkMethod · 0.80
sizeMethod · 0.80
getFunctionMethod · 0.80

Tested by

no test coverage detected