[LLVMdev] Calculating relative sizes of globals in IR

Talin viridia at gmail.com
Sun Dec 6 14:46:31 PST 2009

Is there any way to get a rough size estimate for functions in IR? Say I
have a bitcode file that contains the definition of several classes. I'd
like to be able to read in the file and report 'class A is roughly twice as
big as class B', or 'This file consists of 60% class A, 30% class B, and 10%
class C'. The numbers would be a rough relative measurement of the size of
all globals and methods of the class, but they wouldn't have to correspond
to the exact byte size of the final executable.

Basically what I want to do is track over time the amount of overhead caused
by language features such as reflection and other metadata.

-- Talin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091206/c1cd7ca7/attachment.html>

More information about the llvm-dev mailing list