[llvm-commits] [llvm-gcc-4.2] r74575 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Dale Johannesen
dalej at apple.com
Wed Jul 1 10:29:12 PDT 2009
On Jul 1, 2009, at 4:54 AMPDT, Duncan Sands wrote:
> 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.
No, this code is part of gcc, so gcc style should be OK; the llvm*
files are a mix of the styles as it is. Besides, I consider worrying
about this a complete waste of time (as a corollary, however, I never
object to other people's stylistic changes).
More information about the llvm-commits
mailing list