[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)
commitb3d258fc44b588f06eb35f8e4b9a6d1fc859acec
treef5cdf905c15e638ade646c9c534b585a4de34782
parentbb56755f153a83387fa6c7fa0a6d7d540da41633
[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

llvm-svn: 369191
llvm/lib/CodeGen/MachineBlockPlacement.cpp
llvm/test/CodeGen/PowerPC/block-placement.mir