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

Method updateDefault

lib/propanalysis/AllocSizeAnalyzer.cpp:297–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295}
296
297void AllocSizeAnalyzer::updateDefault(const llvm::Module &M) {
298 ManualAllocLoader MAL;
299 for (const auto &F : M) {
300 if (!F.isDeclaration())
301 continue;
302
303 if (MAL.isAllocFunction(F)) {
304 std::map<unsigned, bool> DefaultValueMap;
305 for (auto AllocSizeArg : MAL.getAllocSizeArgNo(F)) {
306 if (AllocSizeArg > F.arg_size())
307 continue;
308 DefaultValueMap.emplace(AllocSizeArg, true);
309 }
310 updateDefault(*const_cast<llvm::Function *>(&F), DefaultValueMap);
311 continue;
312 }
313 }
314
315 for (auto Iter : ArgFlowMap) {
316 auto &AF = Iter.second;
317 if (!AF)
318 continue;
319
320 if (AF->getState() != AnalysisState_Pre_Analyzed)
321 continue;
322
323 Report.add(*AF);
324 }
325}
326
327void AllocSizeAnalyzer::updateDefault(const llvm::Function &F,
328 const std::map<unsigned, bool> &Values) {

Callers

nothing calls this directly

Calls 8

getAllocSizeArgNoMethod · 0.80
getStateMethod · 0.80
endMethod · 0.80
setAllocSizeMethod · 0.80
setStateMethod · 0.80
isAllocFunctionMethod · 0.45
addMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected