diff options
| author | Jessica Paquette <jpaquette@apple.com> | 2017-09-27 20:47:39 +0000 |
|---|---|---|
| committer | Jessica Paquette <jpaquette@apple.com> | 2017-09-27 20:47:39 +0000 |
| commit | 4cf187b5b418e55c0cf8a662fd0fe48e1639f7b6 (patch) | |
| tree | 780ec8220057bdaef2c48de00696dee1a756ab85 /llvm/lib/Target/AArch64/AArch64InstrInfo.h | |
| parent | bd3a7633f19365cb7ac24d6bc646d5547b734fc0 (diff) | |
| download | bcm5719-llvm-4cf187b5b418e55c0cf8a662fd0fe48e1639f7b6.tar.gz bcm5719-llvm-4cf187b5b418e55c0cf8a662fd0fe48e1639f7b6.zip | |
[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
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64InstrInfo.h')
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64InstrInfo.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.h b/llvm/lib/Target/AArch64/AArch64InstrInfo.h index 4d510efcea3..9a338b53c7a 100644 --- a/llvm/lib/Target/AArch64/AArch64InstrInfo.h +++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.h @@ -350,24 +350,23 @@ public: ArrayRef<std::pair<MachineMemOperand::Flags, const char *>> getSerializableMachineMemOperandTargetFlags() const override; + bool + canOutlineWithoutLRSave(MachineBasicBlock::iterator &CallInsertionPt) const; bool isFunctionSafeToOutlineFrom(MachineFunction &MF) const override; - std::pair<size_t, unsigned> - getOutliningCallOverhead(MachineBasicBlock::iterator &StartIt, - MachineBasicBlock::iterator &EndIt) const override; - std::pair<size_t, unsigned> getOutliningFrameOverhead( + MachineOutlinerInfo getOutlininingCandidateInfo( std::vector< std::pair<MachineBasicBlock::iterator, MachineBasicBlock::iterator>> - &CandidateClass) const override; + &RepeatedSequenceLocs) const override; AArch64GenInstrInfo::MachineOutlinerInstrType getOutliningType(MachineInstr &MI) const override; void insertOutlinerEpilogue(MachineBasicBlock &MBB, MachineFunction &MF, - unsigned FrameClass) const override; + const MachineOutlinerInfo &MInfo) const override; void insertOutlinerPrologue(MachineBasicBlock &MBB, MachineFunction &MF, - unsigned FrameClass) const override; + const MachineOutlinerInfo &MInfo) const override; MachineBasicBlock::iterator insertOutlinedCall(Module &M, MachineBasicBlock &MBB, MachineBasicBlock::iterator &It, MachineFunction &MF, - unsigned CallClass) const override; + const MachineOutlinerInfo &MInfo) const override; /// Returns true if the instruction has a shift left that can be executed /// more efficiently. bool isExynosShiftLeftFast(const MachineInstr &MI) const; |

