]> 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>
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)
commit71435c624d48c271cf7e1d2f15eb4397f98d6eab
tree39710a94958a06618c3404f912471e90cda3d307
parent8b6d356c5371de4e9336851283b1e85978ecdce3
[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

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