[LLVMdev] malloc vs malloc

Dan Gohman gohman at apple.com
Mon Jan 12 08:24:50 PST 2009


On Jan 11, 2009, at 11:22 AM, Chris Lattner wrote:

>>> There is no good reason for malloc to be an instruction anymore.   
>>> I'd
>>> be very happy if it got removed.  Even if we keep it, malloc/alloca
>>> should be extended to optionally take 64-bit sizes.
>>
>> I'm curious. Do we want to keep the free instruction?
>
> No, there's no reason to.


There still are reasons to have it; just grep around for FreeInst.   
Function
attributes are not yet sufficient to replace all of those yet.

And if the ailgnment attribute on MallocInst were implemented, perhaps
via posix_memalign or other target-specific mechanisms, then MallocInst
would also have a reason to be kept.

Dan




More information about the llvm-dev mailing list