[CodeGen] Do the Simple Early Return in block-placement pass to optimize the blocks
authorKang Zhang <shkzhang@cn.ibm.com>
Mon, 12 Aug 2019 13:15:31 +0000 (13:15 +0000)
committerKang Zhang <shkzhang@cn.ibm.com>
Mon, 12 Aug 2019 13:15:31 +0000 (13:15 +0000)
commit342fb0db6d98d43252cbaeb6123cd154976c42aa
treedca9f9a765851e93bd2b5061b6388f686748e905
parent20b2cd3c0bfe8f732bb135edb7f3c8436d005fe9
[CodeGen] Do the Simple Early Return in block-placement pass to optimize the blocks

Summary:

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: 368565
llvm/lib/CodeGen/MachineBlockPlacement.cpp
llvm/test/CodeGen/PowerPC/block-placement.mir