Alex Bradbury | 8971842 | 2017-10-19 21:37:38 +0000 | [diff] [blame^] | 1 | //===-- RISCVFrameLowering.h - Define frame lowering for RISCV -*- C++ -*--===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This class implements RISCV-specific bits of TargetFrameLowering class. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef LLVM_LIB_TARGET_RISCV_RISCVFRAMELOWERING_H |
| 15 | #define LLVM_LIB_TARGET_RISCV_RISCVFRAMELOWERING_H |
| 16 | |
| 17 | #include "llvm/Target/TargetFrameLowering.h" |
| 18 | |
| 19 | namespace llvm { |
| 20 | class RISCVSubtarget; |
| 21 | |
| 22 | class RISCVFrameLowering : public TargetFrameLowering { |
| 23 | public: |
| 24 | explicit RISCVFrameLowering(const RISCVSubtarget &STI) |
| 25 | : TargetFrameLowering(StackGrowsDown, |
| 26 | /*StackAlignment=*/16, |
| 27 | /*LocalAreaOffset=*/0) {} |
| 28 | |
| 29 | void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override; |
| 30 | void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override; |
| 31 | |
| 32 | bool hasFP(const MachineFunction &MF) const override; |
| 33 | }; |
| 34 | } |
| 35 | #endif |