[PATCH] D37528: [JumpThreading] Preserve dominance across the pass.

Brian Rzycki via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 26 15:31:24 PDT 2017


brzycki added a comment.

In https://reviews.llvm.org/D37528#881141, @brzycki wrote:

> Rebase to tip as of 9/25. Eugene Zelenko's commit using Clang-tidy modernize-use-using required manual fixes.
>
> Fixed a corner-case bug in MergeBasicBlockIntoOnlyPred() where DestBB could be requested to dominate itself, triggering an assert in the dominance insert code.


I also investigated preserving PDT across JumpThreading. It's turning out to be less trivial than originally anticipated. There are corner-cases of PDT->deleteEdge() that do not work automatically when basic blocks are about to be deleted from a function. I also have to update the PDT preservation algorithm for several external functions:

- SplitBlockPredecessors()
- SplitEdge()
- SplitBlockAndInsertIfThen()
- computeKnownBits()
- (and possibly more that I missed)

For these reasons I'd prefer to preserve PDT in a separate patch on top of this one. If @kuhar and @dberlin are OK with this I'd like to move forward with merging this patch as-is.


https://reviews.llvm.org/D37528





More information about the llvm-commits mailing list