[LLVMdev] Documentation of malloc/free

Chris Lattner clattner at apple.com
Mon Dec 7 10:43:01 PST 2009


On Dec 7, 2009, at 11:24 AM, Jon Harrop wrote:

> On Monday 07 December 2009 17:55:44 Chris Lattner wrote:
>> On Dec 7, 2009, at 9:49 AM, Garrison Venn wrote:
>>> So I gather this means that malloc was removed from the IR because
>>> there are platforms that don't have non-stack allocation semantics?
>>
>> No, it was removed because it wasn't necessary, and the malloc
>> 'instruction' didn't support 64-bit targets.
>
> BTW, what is the state of having to index into structs using i32 and  
> not i64
> even on a 64-bit platform? Is that due to be changed as well or is  
> there some
> reason for requiring an i32?

The index into a struct is a field index, not a byte offset.  Are you  
looking to support more than 4 billion fields in a struct?

-Chris



More information about the llvm-dev mailing list