Lines Matching defs:Malloc
1975 auto *Malloc = const_cast<CallInst *>(dyn_cast<CallInst>(DefUO));
1976 if (!Malloc)
1978 auto *InnerCallee = Malloc->getCalledFunction();
1986 auto *MallocDef = dyn_cast_or_null<MemoryDef>(MSSA.getMemoryAccess(Malloc));
1990 auto shouldCreateCalloc = [](CallInst *Malloc, CallInst *Memset) {
1993 auto *MallocBB = Malloc->getParent(),
2009 if (Malloc->getOperand(0) != MemSet->getLength())
2011 if (!shouldCreateCalloc(Malloc, MemSet) ||
2012 !DT.dominates(Malloc, MemSet) ||
2013 !memoryIsNotModifiedBetween(Malloc, MemSet, BatchAA, DL, &DT))
2015 IRBuilder<> IRB(Malloc);
2016 Type *SizeTTy = Malloc->getArgOperand(0)->getType();
2018 emitCalloc(ConstantInt::get(SizeTTy, 1), Malloc->getArgOperand(0), IRB,
2019 TLI, Malloc->getType()->getPointerAddressSpace());
2029 Malloc->replaceAllUsesWith(Calloc);
2030 deleteDeadInstruction(Malloc);