[PATCH] D54730: [DomTree] Fix order of domtree updates in MergeBlockIntoPredecessor.

Jakub Kuderski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 20 11:45:20 PST 2018


kuhar added a comment.

In https://reviews.llvm.org/D54730#1304463, @NutshellySima wrote:

> Though I don't have bitcode samples to reproduce your findings, I guess `three times faster` is caused by the DomTree is consuming a lot of time in `DeleteUnreachable()`.
>
> Maybe we can put some high level APIs that have these best practices inside DTU such as something like `updateAfterSpliceBlocks` and `updateAfterChangePredecessorTo` or just add a `sort` after running updates legalization. :)


Intuitively, it would make sense to schedule insertions when we anticipate many `DeleteUnreachable` deletions -- insertions cause the CFG to be more dense, which turns unreachable deletions into reachable ones. I'm don't know of any way to guess whether a batch of deletions will cause more unreachable than reachable deletions, and I don't believe scheduling insertions before deletions is always going to be profitable.


Repository:
  rL LLVM

https://reviews.llvm.org/D54730





More information about the llvm-commits mailing list