[CodeGen] Do the Simple Early Return in block-placement pass to optimize the blocks
authorKang Zhang <shkzhang@cn.ibm.com>
Fri, 6 Sep 2019 08:16:18 +0000 (08:16 +0000)
committerKang Zhang <shkzhang@cn.ibm.com>
Fri, 6 Sep 2019 08:16:18 +0000 (08:16 +0000)
commitf879c6875563c0a8cd838f1e13b14dd33558f1f8
tree079e11f983b5c4c64c4f919932e731cfd7adcdf8
parentdd8e73ffc01a75e811855675e29aa46659413f6b
[CodeGen] Do the Simple Early Return in block-placement pass to optimize the blocks

Summary:

Fix a bug of not update the jump table and recommit it again.

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