[MachineOutliner][NFC] Use MBB flags to avoid call checks in getOutliningInfo
authorJessica Paquette <jpaquette@apple.com>
Tue, 13 Nov 2018 23:01:34 +0000 (23:01 +0000)
committerJessica Paquette <jpaquette@apple.com>
Tue, 13 Nov 2018 23:01:34 +0000 (23:01 +0000)
commitcad864d49e90b95de39d62f71fb6d1b7172b7498
treeec5e8277c3cb1137e9008e44625fa019bafdd028
parent9039b6012e2c18416aad0edae548c28159e12f8a
[MachineOutliner][NFC] Use MBB flags to avoid call checks in getOutliningInfo

We already determine a bunch of information about an MBB in
getMachineOutlinerMBBFlags. We can reuse that information to avoid calculating
things that must be false/true.

The first thing we can easily check is if an outlined sequence could ever
contain calls. There's no reason to walk over the outlined range, checking for
calls, if we already know that there are no calls in the block containing the
sequence.

llvm-svn: 346809
llvm/include/llvm/CodeGen/MachineOutliner.h
llvm/lib/CodeGen/MachineOutliner.cpp
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp