Eli Friedman 042dc9e092 [MachineOutliner] Add "thunk" outlining for AArch64.
When we're outlining a sequence that ends in a call, we can save up to
three instructions in the outlined function by turning the call into
a tail-call. I refer to this as thunk outlining because the resulting
outlined function looks like a thunk; suggestions welcome for a better
name.

In addition to making the outlined function shorter, thunk outlining
allows outlining calls which would otherwise be illegal to outline:
we don't need to save/restore LR, so we don't need to prove anything
about the stack access patterns of the callee.

To make this work effectively, I also added
MachineOutlinerInstrType::LegalTerminator to the generic MachineOutliner
code; this allows treating an arbitrary instruction as a terminator in
the suffix tree.

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

llvm-svn: 333015
2018-05-22 19:11:06 +00:00
..
2017-06-01 14:24:31 +00:00
2016-10-26 18:49:16 +00:00
2016-10-18 20:41:30 +00:00
2018-02-26 23:19:25 +00:00
2017-05-23 06:08:37 +00:00
2016-05-26 12:42:55 +00:00
2018-02-26 23:19:25 +00:00
2018-02-16 20:00:57 +00:00