Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions llvm/include/llvm/Transforms/Utils/BuildLibCalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,32 +246,32 @@ namespace llvm {
const DataLayout &DL, const TargetLibraryInfo *TLI);

/// Emit a call to the malloc function.
Value *emitMalloc(Value *Num, IRBuilderBase &B, const DataLayout &DL,
const TargetLibraryInfo *TLI);
Value *emitMalloc(Type *RetTy, Value *Num, IRBuilderBase &B,
const DataLayout &DL, const TargetLibraryInfo *TLI);

/// Emit a call to the calloc function.
Value *emitCalloc(Value *Num, Value *Size, IRBuilderBase &B,
const TargetLibraryInfo &TLI, unsigned AddrSpace);
Value *emitCalloc(Type *RetTy, Value *Num, Value *Size, IRBuilderBase &B,
const TargetLibraryInfo &TLI);

/// Emit a call to the hot/cold operator new function.
Value *emitHotColdNew(Value *Num, IRBuilderBase &B,
Value *emitHotColdNew(Type *RetTy, Value *Num, IRBuilderBase &B,
const TargetLibraryInfo *TLI, LibFunc NewFunc,
uint8_t HotCold);
Value *emitHotColdNewNoThrow(Value *Num, Value *NoThrow, IRBuilderBase &B,
const TargetLibraryInfo *TLI, LibFunc NewFunc,
uint8_t HotCold);
Value *emitHotColdNewAligned(Value *Num, Value *Align, IRBuilderBase &B,
const TargetLibraryInfo *TLI, LibFunc NewFunc,
uint8_t HotCold);
Value *emitHotColdNewAlignedNoThrow(Value *Num, Value *Align, Value *NoThrow,
IRBuilderBase &B,
Value *emitHotColdNewNoThrow(Type *RetTy, Value *Num, Value *NoThrow,
IRBuilderBase &B, const TargetLibraryInfo *TLI,
LibFunc NewFunc, uint8_t HotCold);
Value *emitHotColdNewAligned(Type *RetTy, Value *Num, Value *Align,
IRBuilderBase &B, const TargetLibraryInfo *TLI,
LibFunc NewFunc, uint8_t HotCold);
Value *emitHotColdNewAlignedNoThrow(Type *RetTy, Value *Num, Value *Align,
Value *NoThrow, IRBuilderBase &B,
const TargetLibraryInfo *TLI,
LibFunc NewFunc, uint8_t HotCold);
Value *emitHotColdSizeReturningNew(Value *Num, IRBuilderBase &B,
Value *emitHotColdSizeReturningNew(Type *RetTy, Value *Num, IRBuilderBase &B,
const TargetLibraryInfo *TLI,
LibFunc NewFunc, uint8_t HotCold);
Value *emitHotColdSizeReturningNewAligned(Value *Num, Value *Align,
IRBuilderBase &B,
Value *emitHotColdSizeReturningNewAligned(Type *RetTy, Value *Num,
Value *Align, IRBuilderBase &B,
const TargetLibraryInfo *TLI,
LibFunc NewFunc, uint8_t HotCold);
}
Expand Down
5 changes: 2 additions & 3 deletions llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2014,9 +2014,8 @@ struct DSEState {
return false;
IRBuilder<> IRB(Malloc);
Type *SizeTTy = Malloc->getArgOperand(0)->getType();
auto *Calloc =
emitCalloc(ConstantInt::get(SizeTTy, 1), Malloc->getArgOperand(0), IRB,
TLI, Malloc->getType()->getPointerAddressSpace());
auto *Calloc = emitCalloc(Malloc->getType(), ConstantInt::get(SizeTTy, 1),
Malloc->getArgOperand(0), IRB, TLI);
if (!Calloc)
return false;

Expand Down
Loading
Loading