[LLVMdev] 32-bit indexes

Chris Lattner sabre at nondot.org
Tue Dec 4 11:12:23 PST 2007

On Tue, 4 Dec 2007, Jon Harrop wrote:
> On Tuesday 04 December 2007 16:38, Duncan Sands wrote:
>> Ah, memory allocation!  I think you want to declare a very long array type
>> and then alloc one of them (rather than trying to alloc a large number of
>> array components).
> I see. I was indeed making a mistake. This begs the question of what exactly I
> was doing though. What exactly does "alloc a large number of array
> components" do then? Is it for allocating many arrays of the same type and
> length at the same time? Like a matrix?

As far as I know, the only thing that is not 64-bit clean are the malloc 
and alloca instructions, both of which take a fixed 32-bit integer operand 
instead of either a 32-bit or 64-bit one.  This can be worked around in 
various ways, but the best solution is to just fix it.  Patches welcome. 



More information about the llvm-dev mailing list