<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 2, 2017 at 12:39 PM, Peter Collingbourne <span dir="ltr"><<a href="mailto:peter@pcc.me.uk" target="_blank">peter@pcc.me.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Fri, Jun 2, 2017 at 12:29 PM, Teresa Johnson <span dir="ltr"><<a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Fri, Jun 2, 2017 at 12:18 PM, Peter Collingbourne via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Why do we need a custom dumping format for the summary? Since we already need the YAML format anyway, wouldn't it be better to extend that to cover the entire summary?</div></blockquote><div><br></div></span><div>IMO it is useful/convenient to be able to see the summary in the llvm-dis output. </div></div></div></div></blockquote><div><br></div></span><div>There are two things:</div><div>1) the format of the summary</div><div>2) where to add the dumper</div><div>I'm not too concerned about 2 (I wouldn't add it to llvm-dis, but rather as a subcommand to llvm-lto2, but I don't have a strong opinion about that).<br></div><div><br></div><div>So that leaves the text based summary format. We need a format that is easily parseable so that we can test components that manipulate summaries in isolation. That is what the YAML format is. Why add a second format that is not parseable?</div></div></div></div></blockquote><div><br></div><div>So in this case it is purely for visual inspection - I suggested that Charles add this as LLVM assembly comments, to make it clear that we can't currently reconstruct the summary if the LLVM assembly file is re-assembled (we currently need to rebuild the summary from scratch).  I know you have added support for inputing the type id summaries in YAML form for testing purposes, since they were/are not being generated from IR during the current module summary index builder, but we have the opposite issue with the rest of the summaries (no serialization, but can build from IR).</div><div><br></div><div>Teresa</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>Peter</div><div><div class="h5"><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="m_-890840116137040646HOEnZb"><font color="#888888"><div>Teresa</div></font></span><div><div class="m_-890840116137040646h5"><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Peter</div></div><div class="gmail_extra"><br><div class="gmail_quote"><span>On Fri, Jun 2, 2017 at 8:46 AM, Charles Saternos via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-890840116137040646m_4395274387054974347h5"><div dir="ltr">Hey all,<div><br></div><div>Below is the proposed format for the dump of the ThinLTO module summary in the llvm-dis utility:</div><div><br></div><div>> ../build/bin/llvm-dis t.o && cat t.o.ll</div><div><div>; ModuleID = '2.o'</div><div>source_filename = "2.ll"</div><div>target datalayout = "e-m:e-i64:64-f80:128-n8:16:32<wbr>:64-S128"</div><div>target triple = "x86_64-unknown-linux-gnu"</div><div><br></div><div>@X = constant i32 42, section "foo", align 4</div><div><br></div><div>@a = weak alias i32, i32* @X</div><div><br></div><div>define void @afun() {</div><div>  %1 = load i32, i32* @a</div><div>  ret void</div><div>}</div><div><br></div><div>define void @testtest() {</div><div>  tail call void @boop()</div><div>  ret void</div><div>}</div><div><br></div><div>declare void @boop()</div><div><br></div><div>; Module summary:</div><div>;  testtest (External linkage)</div><div>;    Function (2 instructions)</div><div>;    Calls: boop</div><div>;  X (External linkage)</div><div>;    Global Variable</div><div>;  afun (External linkage)</div><div>;    Function (2 instructions)</div><div>;    Refs:</div><div>;      a</div><div>;  a (Weak any linkage)</div><div>;    Alias (aliasee X)</div></div><div><br></div><div>I've implemented the above format in the llvm-dis utility, since there currently isn't really a way of getting ThinLTO summaries in a human-readable format.</div><div><br></div><div>Let me know what you think of this format, and what information you think should be added/removed.</div><div><br></div><div>Thanks,</div><div>Charles</div><div><br></div></div>
<br></div></div><span>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></span></blockquote></div><span class="m_-890840116137040646m_4395274387054974347HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_-890840116137040646m_4395274387054974347m_-2828515206035129735gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">-- <div>Peter</div></div></div>
</font></span></div>
<br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div></div></div><br><br clear="all"><div><br></div>-- <br><span><div class="m_-890840116137040646m_4395274387054974347gmail_signature" data-smartmail="gmail_signature"><span style="font-family:Times;font-size:medium"><table cellspacing="0" cellpadding="0"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Teresa Johnson |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a> |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"> <a href="tel:(408)%20460-2413" value="+14084602413" target="_blank">408-460-2413</a></td></tr></tbody></table></span></div>
</span></div></div>
</blockquote></div></div></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_-890840116137040646gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">-- <div>Peter</div></div></div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><span style="font-family:Times;font-size:medium"><table cellspacing="0" cellpadding="0"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Teresa Johnson |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a> |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"> 408-460-2413</td></tr></tbody></table></span></div>
</div></div>