[MachineOutliner] AArch64: Avoid saving + restoring LR if possible
authorJessica Paquette <jpaquette@apple.com>
Wed, 27 Sep 2017 20:47:39 +0000 (20:47 +0000)
committerJessica Paquette <jpaquette@apple.com>
Wed, 27 Sep 2017 20:47:39 +0000 (20:47 +0000)
commit4cf187b5b418e55c0cf8a662fd0fe48e1639f7b6
tree780ec8220057bdaef2c48de00696dee1a756ab85
parentbd3a7633f19365cb7ac24d6bc646d5547b734fc0
[MachineOutliner] AArch64: Avoid saving + restoring LR if possible

This commit allows the outliner to avoid saving and restoring the link register
on AArch64 when it is dead within an entire class of candidates.

This introduces changes to the way the outliner interfaces with the target.
For example, the target now interfaces with the outliner using a
MachineOutlinerInfo struct rather than by using getOutliningCallOverhead and
getOutliningFrameOverhead.

This also improves several comments on the outliner's cost model.

https://reviews.llvm.org/D36721

llvm-svn: 314341
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
llvm/test/CodeGen/AArch64/machine-outliner-remarks.ll
llvm/test/CodeGen/AArch64/machine-outliner.mir
llvm/test/CodeGen/X86/machine-outliner.ll