blob: 71f85864a39cb9f6f597defb90da926a2d476b77 [file] [log] [blame]
Alex Bradbury89718422017-10-19 21:37:38 +00001//===-- 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
David Blaikie1be62f02017-11-03 22:32:11 +000017#include "llvm/CodeGen/TargetFrameLowering.h"
Alex Bradbury89718422017-10-19 21:37:38 +000018
19namespace llvm {
20class RISCVSubtarget;
21
22class RISCVFrameLowering : public TargetFrameLowering {
23public:
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