<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Oct 11, 2013 at 12:07 PM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">><br>
> Since we don't have ODR, we may have macros defined differently for a struct<br>
> in a .h file,<br>
> thus having two versions of the struct from two different CU. It seems that<br>
> we can't assume<br>
> structs with the same name and defined in the same file/line/column are the<br>
> same.<br>
><br>
<br>
</div>Ah right sorry, I remember this. Also, macros are evil, just ask the<br>
modules guys :)<br>
<div class="im"><br>
> Hashing the types can happen either at the front end or at IR level. That is<br>
> our first design choice :)<br>
><br>
<br>
</div>Sorta :)<br>
<div class="im"><br>
> I think we should try not to hash the types for non-LTO builds at the front<br>
> end or at IR level, since it does not give us<br>
> any benefit given that we are hashing them at the back end.<br>
><br>
> One advantage of hashing it at IR level is that we can just hash the MDNodes<br>
> that affect the<br>
> type MDNode, at front end, the AST contains more information and should be<br>
> harder to hash.<br>
<br>
</div>It depends upon the goals. If the goal is to make debug information<br>
post-link smaller then just using the type hashing machinery for<br>
structs will be sufficient. </blockquote><div><br></div><div>By "the type hashing machinery for structs", are you referring to the type hashing at the back end?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
However, if it's to save space during an<br>
LTO link then we'll want to do it in the front end.<br></blockquote><div><br></div><div>Yes, my purpose here is to save memory space in number of MDNodes (also # of DIEs) generated in a LTO build.</div><div>Type hashing at the DIE level can reduce the dwarf size.</div>
<div><br></div><div>Manman</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Doug: Have a link for how you do the C type merging for modules?<br>
<span class="HOEnZb"><font color="#888888"><br>
-eric<br>
</font></span></blockquote></div><br></div></div>