OSDN Git Service

[MachineBlockPlacement] Let the target optimize the branches at the end.
authorQuentin Colombet <qcolombet@apple.com>
Mon, 2 May 2016 22:58:59 +0000 (22:58 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Mon, 2 May 2016 22:58:59 +0000 (22:58 +0000)
commit1b86775a90e2de2ebe117106d657d6a92a7d5463
treee3763c63d6869db963781f230b8ca1dca344b19e
parenta15f9f52c3ee0cebe9142aa971db46825d52e040
[MachineBlockPlacement] Let the target optimize the branches at the end.

After the layout of the basic blocks is set, the target may be able to get rid
of unconditional branches to fallthrough blocks that the generic code does not
catch. This happens any time TargetInstrInfo::AnalyzeBranch is not able to
analyze all the branches involved in the terminators sequence, while still
understanding a few of them.

In such situation, AnalyzeBranch can directly modify the branches if it has been
instructed to do so.

This patch takes advantage of that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268328 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineBlockPlacement.cpp
test/CodeGen/X86/implicit-null-check.ll