[LLVMdev] Emitting .zero
David Greene
dag at cray.com
Thu Sep 16 17:12:18 PDT 2010
With LLVM 2.7, I see very inefficient emitting of zeros in .s files:
test_: # @test_
.quad 0 # 0x0
.quad 0 # 0x0
.quad 0 # 0x0
.quad 0 # 0x0
.quad 0 # 0x0
.quad 0 # 0x0
[...]
.quad 4 # 0x4
.quad 4 # 0x4
.quad 4 # 0x4
.quad 4 # 0x4
[...]
The [...] pieces are huge. This isn't a zeroinitializer so its not
simply a matter of emitting zeroinitializers more efficiently.
Ideally we'd emit the zeros with a .zero directive.
In this case, doing so is the difference between a 3MB asm file and a
20MB asm file.
I searched the bug database but didn't find anything about this. Has
anyone looked at improving this? If not I'll work on it and get a
patch sent up.
But maybe it's fixed in 2.8 or something.
-Dave
More information about the llvm-dev
mailing list