[llvm-commits] [llvm-gcc-4.2] r74575 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Duncan Sands baldrick at free.fr
Wed Jul 1 04:54:56 PDT 2009

Hi Dale,

>>> It's not that big of a deal, but please use SmallVector<int, 4> or
>>> something instead of alloca.  SmallVector works when "N" is more than
>>> 4 by going to the heap so you won't run out of stack space for large
>>> N, and is more portable.
>> I am not a big lover of alloca, but it was used several places in this
>> code before I started working on it so I don't think portability can
>> be a problem, and the numbers involved cannot be big enough to run out
>> of stack space.
> Ok, works for me.  Please don't use it in normal llvm code though,  
> llvm-gcc is fine.

it was used in two places in the llvm parts of llvm-gcc before.  Since
the llvm style is to use SmallVector, can you please modify all places
to use SmallVector instead of alloca.

Thanks a lot,


More information about the llvm-commits mailing list