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

Method updateFieldFlow

lib/propanalysis/AllocSizeAnalyzer.cpp:274–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272}
273
274void AllocSizeAnalyzer::updateFieldFlow(ArgFlow &AF, std::vector<int> Indices) {
275 auto &A = AF.getLLVMArg();
276 auto *T = A.getType();
277 while (isa<llvm::PointerType>(T))
278 T = T->getPointerElementType();
279
280 auto *ST = dyn_cast_or_null<llvm::StructType>(T);
281 if (!ST)
282 return;
283
284 for (unsigned S = 0; S < ST->getNumElements(); ++S) {
285 Indices.push_back(S);
286 if (Report.has(A, Indices)) {
287 AF.setStruct(ST);
288 auto &FF = AF.getOrCreateFieldFlow(S);
289 if (Report.get(A, Indices))
290 FF.setAllocSize();
291 updateFieldFlow(FF, Indices);
292 }
293 Indices.pop_back();
294 }
295}
296
297void AllocSizeAnalyzer::updateDefault(const llvm::Module &M) {
298 ManualAllocLoader MAL;

Callers

nothing calls this directly

Calls 5

setStructMethod · 0.80
setAllocSizeMethod · 0.80
getTypeMethod · 0.45
hasMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected