Teach MBP to force-merge layout successors for blocks with unanalyzable
authorChandler Carruth <chandlerc@gmail.com>
Sun, 13 Nov 2011 12:17:28 +0000 (12:17 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sun, 13 Nov 2011 12:17:28 +0000 (12:17 +0000)
commit6527ecc9189058b762c699521462956995f59dd8
tree12f24d1e098fa2f79877682923f71afb3c93b913
parentf3fc0050abc1698504cbaede7766c4180c076928
Teach MBP to force-merge layout successors for blocks with unanalyzable
branches that also may involve fallthrough. In the case of blocks with
no fallthrough, we can still re-order the blocks profitably. For example
instruction decoding will in some cases continue past an indirect jump,
making laying out its most likely successor there profitable.

Note, no test case. I don't know how to write a test case that exercises
this logic, but it matches the described desired semantics in
discussions with Jakob and others. If anyone has a nice example of IR
that will trigger this, that would be lovely.

Also note, there are still assertion failures in real world code with
this. I'm digging into those next, now that I know this isn't the cause.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144499 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineBlockPlacement.cpp