[LLVMdev] Which is more compact, .bc or .ll.gz? And what might be even more compact?
Török Edwin
edwintorok at gmail.com
Tue Dec 14 03:22:19 PST 2010
On Tue, 14 Dec 2010 10:55:09 -0000
"Edmund Grimley-Evans" <Edmund.Grimley-Evans at arm.com> wrote:
> According to the few tests I did, .ll.gz is more compact:
>
> 1.00 LLVM bitcode (.bc)
> 0.80 Gzipped LLVM bitcode (.bc.gz)
> 4.13 LLVM assembly (.ll)
> 0.68 Gzipped LLVM assembly (.ll.gz)
>
> However, there's not much in it, considering that a stripped native
> binary is about 0.40 on the same scale.
>
> So, seeing as projects such as PNaCl want to send LLVM bitcode over
> the network, are there any proposed solutions for making LLVM bitcode
> more compact?
>
> Removing or simplifying the names of local variables would be an
> obvious thing to do.
opt -globaldce -strip -strip-dead-prototypes -deadtypeelim
-strip removes names of local vars (and more).
> Is there anything else that could be done
> without changing the bitcode format? (There's an obvious analogy with
> JavaScript compression techniques.) Does anyone have any idea how
> much it would help?
You might try some other compression techniques, .xz seems to be
popular these days.
Best regards,
--Edwin
More information about the llvm-dev
mailing list