]> granicus.if.org Git - llvm/commit
[CodeGen] Do the Simple Early Return in block-placement pass to optimize the blocks
authorKang Zhang <shkzhang@cn.ibm.com>
Sat, 17 Aug 2019 14:37:05 +0000 (14:37 +0000)
committerKang Zhang <shkzhang@cn.ibm.com>
Sat, 17 Aug 2019 14:37:05 +0000 (14:37 +0000)
commit4e440a3af0282e7aaa4ab5d8bf978c42c0bc12e5
tree22ab11ff282efe718c7f15d6e0efbc0d3b3d46fc
parentb7f95bd40a8baba25b17cfe7a7e231453ea399b3
[CodeGen] Do the Simple Early Return in block-placement pass to optimize the blocks

Summary:

Fix a bug of preducessors.

In `block-placement` pass, it will create some patterns for unconditional we can do the simple early retrun.
But the `early-ret` pass is before `block-placement`, we don't want to run it again.
This patch is to do the simple early return to optimize the blocks at the last of `block-placement`.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D63972

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369191 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineBlockPlacement.cpp
test/CodeGen/PowerPC/block-placement.mir