[llvm-commits] [llvm] r51806 - in /llvm/trunk: docs/LangRef.html include/llvm/Constants.h include/llvm/DerivedTypes.h include/llvm/Instructions.h lib/AsmParser/llvmAsmParser.cpp.cvs lib/AsmParser/llvmAsmParser.h.cvs lib/AsmParser/llvmAsmParser.y lib/AsmParser/llvmAsmParser.y.cvs lib/Bitcode/Reader/BitcodeReader.cpp lib/Bitcode/Writer/BitcodeWriter.cpp lib/VMCore/Constants.cpp lib/VMCore/Instructions.cpp lib/VMCore/Type.cpp test/Assembler/insertextractvalue.ll
Chris Lattner
clattner at apple.com
Mon Jun 23 10:35:45 PDT 2008
On Jun 23, 2008, at 10:18 AM, Dale Johannesen wrote:
>> That is a really interesting case actually. It is bad that:
>>
>> int x[10000];
>>
>> and:
>>
>> int x[10000] = { 1 };
>>
>> take hugely different amounts of memory to represent.
>
> The representation in the .s files is also hugely different, and much
> bigger than gcc's. I think that could be fixed in the routines that
> write it out,
> but a more compact representation upstream should make that
> unnecessary.
>
> The .bc and .ll files are also big. Something like Fortran's repeated
> initializer
> notation might work well:
>
> @y = global [10000 x i32] [ i32 1, 9999 * i32 0], align 32 yadda yadda
Right, there are many possibilities. We just need to introduce a new
SparseConstantArray or some other similar class for it. This isn't
even particularly hard.
-Chris
More information about the llvm-commits
mailing list