[llvm] r290769 - Add a comment for a todo in LoopUnroll post cleanup

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 30 18:02:46 PST 2016


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.

Philip


On 12/30/2016 04:00 PM, Sean Silva wrote:
> Sorry for the stupid question, but what's the difference between 
> EarlyCSE and GVN in this context? (and more generally in LLVM)
>
> 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.
>
> -- Sean Silva
>
> On Fri, Dec 30, 2016 at 2:10 PM, Philip Reames via llvm-commits 
> <llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>> wrote:
>
>     Author: reames
>     Date: Fri Dec 30 16:10:19 2016
>     New Revision: 290769
>
>     URL: http://llvm.org/viewvc/llvm-project?rev=290769&view=rev
>     <http://llvm.org/viewvc/llvm-project?rev=290769&view=rev>
>     Log:
>     Add a comment for a todo in LoopUnroll post cleanup
>
>
>     Modified:
>         llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp
>
>     Modified: llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp
>     URL:
>     http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp?rev=290769&r1=290768&r2=290769&view=diff
>     <http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp?rev=290769&r1=290768&r2=290769&view=diff>
>     ==============================================================================
>     --- llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp (original)
>     +++ llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp Fri Dec 30
>     16:10:19 2016
>     @@ -673,6 +673,11 @@ bool llvm::UnrollLoop(Loop *L, unsigned
>          }
>        }
>
>     +  // TODO: after peeling or unrolling, previously loop variant
>     conditions are
>     +  // likely to fold to constants, eagerly propagating those here
>     will require
>     +  // fewer cleanup passes to be run.  Alternatively, a
>     LoopEarlyCSE might be
>     +  // appropriate.
>     +
>        NumCompletelyUnrolled += CompletelyUnroll;
>        ++NumUnrolled;
>
>
>
>     _______________________________________________
>     llvm-commits mailing list
>     llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>
>     http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>     <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161230/e72f2f1a/attachment.html>


More information about the llvm-commits mailing list