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

Method next

lib/rootdefanalysis/RDSpace.cpp:59–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59std::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
87std::set<llvm::Instruction *> RDSpace::nextInCallee(const llvm::Function &F,
88 bool Memory) {

Callers

nothing calls this directly

Calls 1

getFunctionMethod · 0.80

Tested by

no test coverage detected