[PATCH] D34135: [JumpThreading] Use DT to avoid processing dead blocks

Mikael Holmén via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 17 22:08:38 PST 2018


uabelho added a comment.

In https://reviews.llvm.org/D34135#979097, @brzycki wrote:

> Added inline comment.






================
Comment at: lib/Transforms/Scalar/JumpThreading.cpp:951
   // This simplifies other transformations.
-  if (DDT->pendingDeletedBB(BB) ||
-      (pred_empty(BB) && BB != &BB->getParent()->getEntryBlock()))
+  if (DDT->pendingDeletedBB(BB) || !DDT->flush().isReachableFromEntry(BB))
     return false;
----------------
brzycki wrote:
> I do not think this will be accepted by the community. The performance implications are  non-trivial (around 1-4%) when this is called on almost every basic block.  It's the primary reason I had to write the DeferredDominance class.
So if anyone who knows this code can tell me what is accepted that would be great because I have no idea.


https://reviews.llvm.org/D34135





More information about the llvm-commits mailing list