[MachineOutliner] NFC: Split up getOutliningBenefit
authorJessica Paquette <jpaquette@apple.com>
Fri, 28 Jul 2017 03:21:58 +0000 (03:21 +0000)
committerJessica Paquette <jpaquette@apple.com>
Fri, 28 Jul 2017 03:21:58 +0000 (03:21 +0000)
commit809d708b8af56391c448b72b49eedae650b98e83
tree74a16171e1e8d74853593d8496b715689c33e1a2
parent75a001ba784f5de87f5b8be731b08b873b5e8551
[MachineOutliner] NFC: Split up getOutliningBenefit

This is some more cleanup in preparation for some actual
functional changes. This splits getOutliningBenefit into
two cost functions: getOutliningCallOverhead and
getOutliningFrameOverhead. These functions return the
number of instructions that would be required to call
a specific function and the number of instructions
that would be required to construct a frame for a
specific funtion. The actual outlining benefit logic
is moved into the outliner, which calls these functions.

The goal of refactoring getOutliningBenefit is to:

- Get us closer to getting rid of the IsTailCall flag

- Further split up "target-specific" things and
"general algorithm" things

llvm-svn: 309356
llvm/include/llvm/Target/TargetInstrInfo.h
llvm/lib/CodeGen/MachineOutliner.cpp
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
llvm/lib/Target/AArch64/AArch64InstrInfo.h
llvm/lib/Target/X86/X86InstrInfo.cpp
llvm/lib/Target/X86/X86InstrInfo.h