<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 26, 2013 at 2:51 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@gmail.com" target="_blank" class="cremed">chandlerc@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
  Patch looks fine to commit. I have a question below about code I don't understand, but it's not new in this patch I just didn't notice it before.<br>
<br>
  I do wonder, would s/Global/Module/g be more clear in an LLVM context?<br></blockquote><div><br></div><div>Good point.  Changed.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
<br>
================<br>
Comment at: lib/Transforms/Scalar/SampleProfile.cpp:332-333<br>
@@ -310,9 +331,4 @@<br>
     Loader.reportParseError("Expected a number, found " + Line);<br>
-  for (int I = 0; I < NumSymbols; I++) {<br>
-    StringRef FName = Loader.readLine();<br>
-    FunctionProfile &FProfile = Profiles[FName];<br>
-    FProfile.BodySamples.clear();<br>
-    FProfile.TotalSamples = 0;<br>
-    FProfile.TotalHeadSamples = 0;<br>
-  }<br>
+  for (int I = 0; I < NumSymbols; I++)<br>
+    Profiles[Loader.readLine()] = SampleFunctionProfile();<br></blockquote><div><br></div><div>Well, it is and it isn't.  It's true that we build empty ones later on, but this one is having the side-effect of reading the symbol table.  I'll get rid of it when I change the output from the profiler.</div>
<div><br></div><div><br></div><div>Diego.</div></div></div></div>