[MachineOutliner] Clean up subtarget handling.
authorEli Friedman <efriedma@codeaurora.org>
Wed, 1 Aug 2018 00:37:20 +0000 (00:37 +0000)
committerEli Friedman <efriedma@codeaurora.org>
Wed, 1 Aug 2018 00:37:20 +0000 (00:37 +0000)
commitda08078fb2c40f78c955bbcab5489bb3d6e01d69
tree4ea7b2eb805fdb3af3e9b9f0a94b6ca37e900f54
parentf4e248c23e05e374910a8becbb91f5d3d7a76a01
[MachineOutliner] Clean up subtarget handling.

Call shouldOutlineFromFunctionByDefault, isFunctionSafeToOutlineFrom,
getOutliningType, and getMachineOutlinerMBBFlags using the correct
TargetInstrInfo. And don't create a MachineFunction for a function
declaration.

The call to getOutliningCandidateInfo is still a little weird, but at
least the weirdness is explicitly called out.

Differential Revision: https://reviews.llvm.org/D49880

llvm-svn: 338465
llvm/lib/CodeGen/MachineOutliner.cpp