<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
The print-module-after-all type of option exists in upstream:
<div class="">
<div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> -print-module-scope - When printing IR for print-[before|after]{-all}
always print a module IR</span></div>
</div>
</div>
<div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><br class="">
</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">
<div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(175, 173, 36);" class="">
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">commit 7d160f714357f6784ead669ce516e94991c12e5a</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">Author: Fedor Sergeev <<a href="mailto:fedor.sergeev@azul.com" class="">fedor.sergeev@azul.com</a>></span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">Date: Fri Dec 1 17:42:46 2017 +0000</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0); min-height: 13px;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class="">
</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> IR printing improvement for function passes - introducing -print-module-scope</span></div>
<p style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0); min-height: 13px;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> </span><br class="webkit-block-placeholder">
</p>
<div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> Summary:</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> When debugging function passes it happens to be rather useful to dump</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> the whole module before the transformation and then use this dump</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> to analyze this single transformation by running it separately</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> on that particular module state.</span></div>
<p style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0); min-height: 13px;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> </span><br class="webkit-block-placeholder">
</p>
<div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> Introducing</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> -print-module-scope</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> debugging option that forces all the function-level IR dumps</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> to become whole-module dumps.</span></div>
<p style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0); min-height: 13px;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> </span><br class="webkit-block-placeholder">
</p>
<div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> This option builds on top of normal dumping controls like</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> -print-before/after</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> -filter-print-funcs</span></div>
<p style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0); min-height: 13px;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> </span><br class="webkit-block-placeholder">
</p>
<div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> The plan is to eventually extend this option to cover other local passes</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> (at least loop passes) but that should go as a separate change.</span></div>
</div>
<div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class="">
</span></div>
</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><br class="">
</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">Loop passes here:</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">
<div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(175, 173, 36);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">commit 5608259c999fb77c5d6093895696f4daebe6b8cd</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Author: Fedor Sergeev <<a href="mailto:fedor.sergeev@azul.com" class="">fedor.sergeev@azul.com</a>></span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Date: Fri Dec 1 18:33:58 2017 +0000</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 13px;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class="">
</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> IR printing improvement for loop passes - handle -print-module-scope</span></div>
</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><br class="">
</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
<br class="">
</div>
<div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">-Daniel</span></div>
<div class=""><br class="">
</div>
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Mar 14, 2018, at 3:51 PM, Philip Reames via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div text="#000000" bgcolor="#FFFFFF" class="">
<p class="">This is interesting, and might be useful. I don't know that this is broadly useful enough for upstream inclusion, but if you could post this to github somewhere, I might play with it.</p>
<p class="">There might also be room to factor out common functionality. We've also run into the need to print whole-module instead of containing construct (i.e. this loop). If we added upstream support for something along the lines of -print-module-after-all,
building the git history could easily be done as a post processing step. <br class="">
</p>
<p class="">Philip<br class="">
</p>
<br class="">
<div class="moz-cite-prefix">On 03/06/2018 10:43 AM, Alexandre Isoard via llvm-dev wrote:<br class="">
</div>
<blockquote type="cite" cite="mid:CANLM5LdprkmGkTtv0ck-DXVoc+nVtdpmfQdjzT-YRPZ_Ym40FA@mail.gmail.com" class="">
<div dir="ltr" class="">Hello,
<div class=""><br class="">
</div>
<div class="">I had a stupid idea recently that turned out not so stupid after all. I wanted to be able to "see" an entire pass pipeline in action to find unnecessary transformations and/or missed opportunities and generally improve the debug-ability of LLVM.</div>
<div class=""><br class="">
</div>
<div class="">So as the title suggest, I implemented an equivalent of "-print-after-all" but instead of printing into stdout I dump into a file that get commit into a temporary git. There are some quirks with it but it's working and is actually awesome. For
example, at first sight, I see multiple time lcssa and instcombine cancelling each other's work.</div>
<div class=""><br class="">
</div>
<div class="">Of course, that has a big impact on compile time when enabled, but that's still practical (git being quite good at its job) when debugging.</div>
<div class=""><br class="">
</div>
<div class="">There are improvement I can make, but would you guys be interested in such feature?</div>
<div class="">
<div class=""><br class="">
</div>
-- <br class="">
<div class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr" class=""><b class="">Alexandre Isoard</b><br class="">
</div>
</div>
</div>
</div>
<br class="">
<fieldset class="mimeAttachmentHeader"></fieldset> <br class="">
<pre wrap="" class="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<br class="">
</div>
_______________________________________________<br class="">
LLVM Developers mailing list<br class="">
<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>