| 463 | } |
| 464 | |
| 465 | std::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 | |
| 488 | std::set<RDNode> RDAnalyzer::handleMemoryCall(RDNode &Node, CallBase &CB) { |
| 489 | auto *F = CB.getCalledFunction(); |
nothing calls this directly
no test coverage detected