<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Jan 30, 2013, at 5:28 PM, Eric Christopher <<a href="mailto:echristo@gmail.com">echristo@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div class="im">
<blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Any thoughts here? </div></div></div></blockquote></div>I used MCLineIDs for fast look-up, do you have any suggestion on what to use here?</div>
<div><div class="im"><br></div></div></div></blockquote><div><br></div><div style="">It took me a while, but I see what you're doing. Effectively I think you can just use a lookup in MCLineDivisionsto see if anything is in the set? Since the SmallSet is going to be stored in exactly the same way anyhow. Also since I've not bothered to look are the CU ids dense or sparse? i.e. 0, 1, 2 or in metadata node order (0, 12, 255, 444)?</div></div></div></div></blockquote><div><br></div>The CU ids will be 0,1,2, …</div><div>I tried to use count on MCLineDivisions, but it takes a long time.</div><div>MCLineDivisions keeps a vector of Line Entries for each CUID, and the size of vector can be large.</div><div>find(int CUID) is pretty fast if the map contains an entry for CUID, but will be slow when it does not.</div><div>I will try std::map.</div><div><br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div class="im"><blockquote type="cite"><div dir="ltr"><div class="gmail_extra">
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><div><blockquote type="cite"><div dir="ltr"><div></div><div>The bit with CUID = -1 or CUID == 0 seems confusing, can you explain this a bit? At times -1 seems to be for invalid CUs and at other times the first/only CU?</div>

</div></blockquote></div>"-1" is the default CUID, when DwarfDebug does not exist.</div><div>So the first line table will be for CUID 0 when DwarfDebug exists, and will be for CUID -1 when DwarfDebug does not exist.</div>

<div><br></div></div></blockquote><div><br></div><div>This seems a bit confusing. Since, for example, we emit a CU for assembly files and so something will always be emitting a CU. I could easily not be seeing something though. At worst it really needs some comments.</div>
</div></div></div></blockquote></div>I added some comments.</div><div><div>+  // CUID and MCLineTableSymbols are set in DwarfDebug, when DwarfDebug does</div><div>+  // not exist, CUID will be -1 and MCLineTableSymbols will be empty. </div>
<div><br></div><div>Updated patch is attached.</div><div><br></div></div></div></blockquote><div><br></div><div style="">Right. I'm not sure why this division exists. Is there some reason why it's -1 in the other case that I'm missing?</div></div></div></div></blockquote>We can probably use 0 as the default value, but is there something wrong with -1 meaning no DwarfDebug?</div><div><br></div><div>Thanks,</div><div>Manman<br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div style=""><br></div><div style="">-eric </div></div></div></div>
</blockquote></div><br></body></html>