reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
3560 if (BadMallocCalls.count(MallocCall)) 3563 for (Instruction *FreeCall : FreesForMalloc[MallocCall]) { 3569 LLVM_DEBUG(dbgs() << "H2S: Removing malloc call: " << *MallocCall 3573 if (isCallocLikeFn(MallocCall, TLI)) { 3574 auto *Num = cast<ConstantInt>(MallocCall->getOperand(0)); 3575 auto *SizeT = dyn_cast<ConstantInt>(MallocCall->getOperand(1)); 3578 ConstantInt::get(MallocCall->getOperand(0)->getType(), TotalSize); 3580 Size = cast<ConstantInt>(MallocCall->getOperand(0)); 3583 unsigned AS = cast<PointerType>(MallocCall->getType())->getAddressSpace(); 3585 Size, "", MallocCall->getNextNode()); 3587 if (AI->getType() != MallocCall->getType()) 3588 AI = new BitCastInst(AI, MallocCall->getType(), "malloc_bc", 3591 MallocCall->replaceAllUsesWith(AI); 3593 if (auto *II = dyn_cast<InvokeInst>(MallocCall)) { 3595 BranchInst::Create(NBB, MallocCall->getParent()); 3596 A.deleteAfterManifest(*MallocCall); 3598 A.deleteAfterManifest(*MallocCall); 3601 if (isCallocLikeFn(MallocCall, TLI)) { 3602 auto *BI = new BitCastInst(AI, MallocCall->getType(), "calloc_bc", 3608 Type *Tys[] = {BI->getType(), MallocCall->getOperand(0)->getType()};