[PATCH] D81089: Mark InstCombine as not preserving PostDomTree

Jakub Kuderski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 3 15:29:17 PDT 2020


kuhar added a comment.

As a quick fix, maybe we could try to detect changes in reverse-unreachable code and update postdominators when that's detected? Not sure how much overhead that would be; InstCombine is already very expensive w.r.t. compilation times.

A couple of questions I'm asking myself:

1. How is CFG preservation actually defined? Can we have a verification pass that checks if passes lie about preserving CFG? A similar issue was a source of many bugs in machine IR that we fixed last Fall.
2. Making root finding insensitive to the order of successors would eliminate some needles recalculations that happen in other places too, provided the alternative ordering is cheap to compute. How can we canonicalize the order of successors? Sorting by BB names doesn't seem like the best idea to me.

I think that whatever the fix ends up being, we should make sure the compilation times are not noticeably regressed before committing changes.


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

https://reviews.llvm.org/D81089





More information about the llvm-commits mailing list