Lines Matching defs:Malloc
1868 auto *Malloc = const_cast<CallInst *>(dyn_cast<CallInst>(DefUO));
1869 if (!Malloc)
1871 auto *InnerCallee = Malloc->getCalledFunction();
1879 auto *MallocDef = dyn_cast_or_null<MemoryDef>(MSSA.getMemoryAccess(Malloc));
1883 auto shouldCreateCalloc = [](CallInst *Malloc, CallInst *Memset) {
1886 auto *MallocBB = Malloc->getParent(),
1902 if (Malloc->getOperand(0) != MemSet->getLength())
1904 if (!shouldCreateCalloc(Malloc, MemSet) ||
1905 !DT.dominates(Malloc, MemSet) ||
1906 !memoryIsNotModifiedBetween(Malloc, MemSet, BatchAA, DL, &DT))
1908 IRBuilder<> IRB(Malloc);
1909 Type *SizeTTy = Malloc->getArgOperand(0)->getType();
1911 Malloc->getArgOperand(0), IRB, TLI);
1921 Malloc->replaceAllUsesWith(Calloc);
1922 deleteDeadInstruction(Malloc);