Lines Matching refs:Malloc
1864 auto *Malloc = const_cast<CallInst *>(dyn_cast<CallInst>(DefUO));
1865 if (!Malloc)
1867 auto *InnerCallee = Malloc->getCalledFunction();
1875 auto *MallocDef = dyn_cast_or_null<MemoryDef>(MSSA.getMemoryAccess(Malloc));
1879 auto shouldCreateCalloc = [](CallInst *Malloc, CallInst *Memset) {
1882 auto *MallocBB = Malloc->getParent(),
1898 if (Malloc->getOperand(0) != MemSet->getLength())
1900 if (!shouldCreateCalloc(Malloc, MemSet) ||
1901 !DT.dominates(Malloc, MemSet) ||
1902 !memoryIsNotModifiedBetween(Malloc, MemSet, BatchAA, DL, &DT))
1904 IRBuilder<> IRB(Malloc);
1905 Type *SizeTTy = Malloc->getArgOperand(0)->getType();
1907 Malloc->getArgOperand(0), IRB, TLI);
1917 Malloc->replaceAllUsesWith(Calloc);
1918 deleteDeadInstruction(Malloc);