<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>In short, yes, EarlyCSE is cheaper GVN. The former only does a
dom tree walk, doesn't worry about merges, and doesn't do any
sophisticated memory analysis. Once NewGVN is baked and on by
default, we can talk about whether it's more appropriate for this
type of incremental cleanup. Given it requires us to compute
memorySSA - which is expensive - I really doubt it's going to be
the right choice for this use case.</p>
<p>Philip<br>
</p>
<br>
<div class="moz-cite-prefix">On 12/30/2016 04:00 PM, Sean Silva
wrote:<br>
</div>
<blockquote
cite="mid:CAHnXoan+FVrGWSRfZfoyavb_8EjQ8fuiRf4RVWGuJ8iyKdEjjg@mail.gmail.com"
type="cite">
<div dir="ltr">Sorry for the stupid question, but what's the
difference between EarlyCSE and GVN in this context? (and more
generally in LLVM)
<div><br>
</div>
<div>Is EarlyCSE just a "cheaper" GVN? If so then that makes
NewGVN seem even more attractive, because from reading the
paper the algorithm is quite tunable w.r.t. compile time cost
vs accuracy so maybe it can replace both EarlyCSE and
CurrentGVN.</div>
<div><br>
</div>
<div>-- Sean Silva</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Dec 30, 2016 at 2:10 PM, Philip
Reames via llvm-commits <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:llvm-commits@lists.llvm.org" target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a></a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Author:
reames<br>
Date: Fri Dec 30 16:10:19 2016<br>
New Revision: 290769<br>
<br>
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project?rev=290769&view=rev"
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=290769&view=rev</a><br>
Log:<br>
Add a comment for a todo in LoopUnroll post cleanup<br>
<br>
<br>
Modified:<br>
llvm/trunk/lib/Transforms/<wbr>Utils/LoopUnroll.cpp<br>
<br>
Modified: llvm/trunk/lib/Transforms/<wbr>Utils/LoopUnroll.cpp<br>
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp?rev=290769&r1=290768&r2=290769&view=diff"
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/lib/<wbr>Transforms/Utils/LoopUnroll.<wbr>cpp?rev=290769&r1=290768&r2=<wbr>290769&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/lib/Transforms/<wbr>Utils/LoopUnroll.cpp
(original)<br>
+++ llvm/trunk/lib/Transforms/<wbr>Utils/LoopUnroll.cpp Fri
Dec 30 16:10:19 2016<br>
@@ -673,6 +673,11 @@ bool llvm::UnrollLoop(Loop *L, unsigned<br>
}<br>
}<br>
<br>
+ // TODO: after peeling or unrolling, previously loop
variant conditions are<br>
+ // likely to fold to constants, eagerly propagating those
here will require<br>
+ // fewer cleanup passes to be run. Alternatively, a
LoopEarlyCSE might be<br>
+ // appropriate.<br>
+<br>
NumCompletelyUnrolled += CompletelyUnroll;<br>
++NumUnrolled;<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a moz-do-not-send="true"
href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a moz-do-not-send="true"
href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits"
rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>