[LLVMdev] How to reduce the footprint of MDNodes? (About the comment you made at BOF LTO)

Chris Lattner clattner at apple.com
Mon Nov 11 23:29:56 PST 2013


Hi Manman (and llvmdev),

I filed these two bugs to track the ideas that I was cooking:

http://llvm.org/bugs/show_bug.cgi?id=17891
http://llvm.org/bugs/show_bug.cgi?id=17892

TL;DR: I'm saying we should go from:

	!14 = metadata !{i32 786445, metadata !1, metadata !10, metadata !"y", i32 3, i64 32, i64 32, i64 32, i32 0, metadata !13}
to:
	!14 = metadata !"v12,14,y,3,0,32,32,32"(metadata !1, metadata !13)

I think that this is along the lines of what you're thinking of, but doesn't require doing specific optimizations for constant values (since most of those would be encoded into strings instead of showing up as operands).

This is a pretty big project, but I think the payoff would be a huge constant factor improvement in memory use.  We should probably also use a similar approach for profile info.

-Chris


On Nov 11, 2013, at 4:09 PM, Manman Ren <mren at apple.com> wrote:

> 
> Hi Chris,
> 
> I missed the BOF LTO session and Bob mentioned to me that you had a comment about how to reduce the footprint of MDNodes.




More information about the llvm-dev mailing list