[PATCH] D25075: [JumpThreading] Allow threading over loop headers when creating single block loops

James Molloy via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 3 12:22:57 PDT 2016


jmolloy added a comment.

Thanks Philip for the prompt review. Just one question for now before I rework this tomorrow.



> reames wrote in LazyValueInfo.cpp:927
> Nope.  This will break key parts about LVI.  The problem here is that there can be facts learned about the Phi along a particular path.  The classic example is the backedge test of a loop can tell you that the value along the backedge is restricted to say < 400.

How is this actually *supposed* to work? My debugging shows that we recurse into getEdgeValue and because we end up in the same state we've been before, we stop recursing and just return overdefined. Surely we can be more clever than this - at the moment I can't see how even trivial loops are managed, but I must be missing something.

Repository:
  rL LLVM

https://reviews.llvm.org/D25075





More information about the llvm-commits mailing list