[PATCH] D67207: [JumpThreading] Fix the AssertVH handling for debug builds.

Brian Rzycki via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 5 15:17:57 PDT 2019


brzycki added a comment.

> Maybe it makes sense to change the TryToSimplifyUncondBranchFromEmptyBlock API so it doesn't erase the basic block, then call DeleteDeadBlock after we've cleaned up LVI etc.?

Depending on the number of call-sites of `TryToSimplifyUncondBranchFromEmptyBlock` this may be the way to go.

> It seems the code is written in the way DTU cannot be Eager.

Originally the updates to `DT` were all immediate (Eager) and compile-time performance of the JumpThreading pass became considerably expensive. It's not uncommon for the pass to create BBs, modify the edges in/out of them, only to completely remove the code later when analysis at a different BB` shows the path is dead or unreachable.

The other, less-ideal, alternative is to always call `LVI->eraseBlock(&BB)` and simply lose the analysis for the block. It's no ideal but was actually the way this code behaved before Deferred DTU.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67207/new/

https://reviews.llvm.org/D67207





More information about the llvm-commits mailing list