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

Method buildCallerMap

lib/rootdefanalysis/RDSpace.cpp:165–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165std::set<Function *> RDSpace::buildCallerMap(Function &F) {
166 std::set<Function *> Result;
167 for (BasicBlock &B : F)
168 for (Instruction &I : B) {
169 auto *CB = dyn_cast_or_null<CallBase>(&I);
170 if (!CB)
171 continue;
172
173 auto *CF = const_cast<Function *>(util::getCalledFunction(*CB));
174 if (!CF)
175 continue;
176
177 updateMap(CallerMap, CF, CB);
178 if (CF->size() == 0)
179 continue;
180
181 Result.insert(CF);
182 }
183 return Result;
184}
185
186void RDSpace::build(Function &F) {
187 // 1. Traversing Instructions to get space information

Callers

nothing calls this directly

Calls 2

getCalledFunctionFunction · 0.85
sizeMethod · 0.80

Tested by

no test coverage detected