[PATCH] D116692: [SimplifyCFG] Tail-merging all blocks with `unreachable` terminator, final take

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 5 14:38:22 PST 2022


lebedev.ri added a comment.

In D116692#3223679 <https://reviews.llvm.org/D116692#3223679>, @rnk wrote:

> I think I prefer this version over the previous. This may be slightly ugly, but IMO it is functionally better (fewer analysis reruns and pass updates).

I think one big reason why this is indeed better is because now it will be trivial to introduce
(and pass here) `bool SkipProfitabilityChecks` option to `SinkCommonCodeFromPredecessors()`.

> Maybe others have ideas for how to make it nicer.

Looking at it, it's actually not *that* ugly as it seemed when i was writing the code.
I guess i could wrap this tail-merging/undo into a class, not sure if that would help.

> What do other folks (@nikic @aeubanks @asbirlea) think about this approach?




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116692



More information about the llvm-commits mailing list