[llvm-commits] [llvm] r169157 - /llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp

Bill Wendling wendling at apple.com
Mon Dec 3 13:33:08 PST 2012


On Dec 3, 2012, at 1:29 PM, Michael Ilseman <milseman at apple.com> wrote:

> Author: milseman
> Date: Mon Dec  3 15:29:36 2012
> New Revision: 169157
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=169157&view=rev
> Log:
> Since this SmallVector immediately grows on the next line, don't waste stack space. SmallVector is still needed due to existing APIs growing their arguments
> 
Why not make the size 256*1024 instead of 0?

-bw

> Modified:
>    llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
> 
> Modified: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp?rev=169157&r1=169156&r2=169157&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (original)
> +++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Mon Dec  3 15:29:36 2012
> @@ -1939,7 +1939,7 @@
> /// WriteBitcodeToFile - Write the specified module to the specified output
> /// stream.
> void llvm::WriteBitcodeToFile(const Module *M, raw_ostream &Out) {
> -  SmallVector<char, 1024> Buffer;
> +  SmallVector<char, 0> Buffer;
>   Buffer.reserve(256*1024);
> 
>   // If this is darwin or another generic macho target, reserve space for the
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list