| 57 | } |
| 58 | |
| 59 | std::set<Instruction *> RDSpace::next(Instruction &I) { |
| 60 | auto *F = I.getFunction(); |
| 61 | if (!F) |
| 62 | return {}; |
| 63 | |
| 64 | auto &SSA = FAM.getResult<MemorySSAAnalysis>(*F).getMSSA(); |
| 65 | auto *MA = SSA.getMemoryAccess(&I); |
| 66 | if (!MA) { |
| 67 | std::set<BasicBlock *> V; |
| 68 | |
| 69 | auto *F = I.getFunction(); |
| 70 | assert(F && "Unexpected Program State"); |
| 71 | |
| 72 | return getLastMemInsts(*F, I, V); |
| 73 | } |
| 74 | |
| 75 | std::set<Instruction *> Result; |
| 76 | for (auto *NextMA : next(*MA)) { |
| 77 | if (!NextMA) |
| 78 | continue; |
| 79 | |
| 80 | for (auto *NextI : getInstructions(*NextMA)) { |
| 81 | Result.insert(NextI); |
| 82 | } |
| 83 | } |
| 84 | return Result; |
| 85 | } |
| 86 | |
| 87 | std::set<llvm::Instruction *> RDSpace::nextInCallee(const llvm::Function &F, |
| 88 | bool Memory) { |
nothing calls this directly
no test coverage detected