[PATCH] D29705: Fix PR 24415 (at least), by making our post-dominator tree behavior sane.

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 19 17:28:12 PST 2017


dberlin marked an inline comment as done.
dberlin added a comment.

adding the last two people  to touch structurize CFG.

The code is mostly undocumented, and it seems ... interesting, in many ways .
It has an obsession with assuming regions are started and terminated with branchinsts, when they could, for example, be switches with one successor (it looks like it forces switch lowering instead of fixing the code).
It also gets successors of blocks by trying to grab terminators and walk over the terminator successors, instead of just walking the successors directly.

In any case, there is nothing to fix for these testcases.
There are two failures.
In branch-on-argument.ll, we fail invert_branch_on_arg_inf_loop.
This is because there are no SESE regions here once post-dom is correct.
The only SESE region is function entry to function exit, and structurizeCFG explicitly skips that region,

Ditto for no-branch-to-entry.ll
It's not a SESE region, so it no longer processes it.
I can't make a testcase where it wants to branch to entry anymore.

I'm XFAIL'ing it for someone to determine if it's really still needed. My guess is this was a side effect of broken SESE regions.


https://reviews.llvm.org/D29705





More information about the llvm-commits mailing list