<div dir="ltr">You should not expect pretty much any perf uplifts from any DCE, ever.<div>If it does, it's mostly luck (better cache behavior, etc).</div><div><br></div><div>You should expect size improvements ;)<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 1, 2016 at 10:51 PM, Das, Dibyendu 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 lang="EN-US" link="#0563C1" vlink="#954F72">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1f497d">What kind of perf. uplifts are expected and in what benchmarks/apps ?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1f497d"><u></u> <u></u></span></p>
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt">From:</span></b><span style="font-size:11.0pt"> llvm-dev [mailto:<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank">llvm-dev-bounces@lists.llvm.org</a>]
<b>On Behalf Of </b>David Callahan via llvm-dev<br>
<b>Sent:</b> Monday, August 01, 2016 11:15 PM<span class=""><br>
<b>To:</b> LLVM Dev Mailing list <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
</span><b>Cc:</b> Nadav Rotem <<a href="mailto:nrotem@fb.com" target="_blank">nrotem@fb.com</a>><br>
<b>Subject:</b> [llvm-dev] [LLVM] New Dead Code Elimination<u></u><u></u></span></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal"><span style="color:black">I have a rewrite of the aggressive dead code elimination pass which handles control flow and allows may-be-infinite loops to be removed under optional flag. Chandler suggested rather than a large change a series
of small changes and, while that may not get us to small changes easily, there has been no further commentary on the diff:
<a href="https://reviews.llvm.org/D18762" target="_blank">https://reviews.llvm.org/D18762</a>. Given that, I will plan on proposing a series of diffs and would like to recruit some people who are interested in the change to help review those changes.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:black"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:black">I expect to stage as follows:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:black"> <u></u><u></u></span></p>
<p>
<u></u><span style="color:black"><span>1.<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span style="color:black">Rewrite base algorithm to introduce data structures needed to hold extra information (no functional change)<u></u><u></u></span></p>
<p>
<u></u><span style="color:black"><span>2.<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span style="color:black">Rewrite base algorithm to allow removing of control flow (under option, off by default). This variant will not be correct in the general case.<u></u><u></u></span></p>
<p>
<u></u><span style="color:black"><span>3.<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span style="color:black">Code to rewrite the control flow graph and remove dead basic blocks<u></u><u></u></span></p>
<p>
<u></u><span style="color:black"><span>4.<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span style="color:black">Identify Phi nodes with non-instruction reaching definitions and keep the associated source block live. Identify Phi nodes with multiple-live values from dead blocks<u></u><u></u></span></p>
<p>
<u></u><span style="color:black"><span>5.<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span style="color:black">Remove unreachable code discovered by post-order traversal to avoid.<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.25in;text-indent:.25in"><span style="color:black"> (code is functionally correct at this point)<u></u><u></u></span></p>
<p>
<u></u><span style="color:black"><span>6.<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span style="color:black">Use post-order traversal to identify loop bottoms. By default this will be kept live but include switch to allow loops to be removed.
<u></u><u></u></span></p>
<p>
<u></u><span style="color:black"><span>7.<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span style="color:black">Improve handling of live values out of dead regions<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:black"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:black">Please respond if you are willing to help or have suggestions on staging or approach.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:black"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:black">Thanks<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:black">David<u></u><u></u></span></p>
</div>
</div></div></div>
</div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">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/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>