On Mon, Dec 7, 2009 at 12:24 PM, Jon Harrop <jon at ffconsultancy.com> 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?This is further reasoning to support an iptr/intp/etc... type.
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
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? -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e
On Monday 07 December 2009 18:43:01 Chris Lattner wrote:> On Dec 7, 2009, at 11:24 AM, Jon Harrop wrote: > > 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?Not yet. :-) I'd just like to have GEPs indices be homogeneous on all platforms to simplify things, i.e. use homogeneous containers of indices in statically-typed languages. -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e