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

Method handleStoreInst

lib/rootdefanalysis/RDAnalyzer.cpp:465–486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

463}
464
465std::set<RDNode> RDAnalyzer::handleStoreInst(RDNode &Node, StoreInst &I) {
466 auto *Ptr = I.getPointerOperand();
467 assert(Ptr && "Unexpected Program State");
468
469 std::set<RDNode> Result;
470 auto PropRet = isPropagated(Node.getTarget(), *Ptr);
471 if (PropRet == PROPTYPE_NONE)
472 return {Node};
473
474 RDNode NewNode(0, I, &Node);
475 // NOTE: Target of register should be same as its location.
476 if (isa<RDRegister>(NewNode.getTarget())) {
477 auto *LocI = dyn_cast<Instruction>(&NewNode.getTarget().getIR());
478 assert(LocI && "Unexpected Program State");
479 NewNode.setLocation(*LocI);
480 }
481
482 if (PropRet == PROPTYPE_INCL)
483 return {NewNode};
484
485 return {Node, NewNode};
486}
487
488std::set<RDNode> RDAnalyzer::handleMemoryCall(RDNode &Node, CallBase &CB) {
489 auto *F = CB.getCalledFunction();

Callers

nothing calls this directly

Calls 1

setLocationMethod · 0.45

Tested by

no test coverage detected