blob: 2ae6d72720e2c08c592e12c91d68149ed4fcd41c [file] [log] [blame]
Justin Holewinskiae556d32012-05-04 20:18:50 +00001//===--- NVPTXFrameLowering.h - Define frame lowering for NVPTX -*- 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//
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef NVPTX_FRAMELOWERING_H
15#define NVPTX_FRAMELOWERING_H
16
17#include "llvm/Target/TargetFrameLowering.h"
18
Justin Holewinskiae556d32012-05-04 20:18:50 +000019namespace llvm {
20class NVPTXTargetMachine;
21
22class NVPTXFrameLowering : public TargetFrameLowering {
23 NVPTXTargetMachine &tm;
24 bool is64bit;
25
26public:
27 explicit NVPTXFrameLowering(NVPTXTargetMachine &_tm, bool _is64bit)
Justin Holewinski0497ab12013-03-30 14:29:21 +000028 : TargetFrameLowering(TargetFrameLowering::StackGrowsUp, 8, 0), tm(_tm),
29 is64bit(_is64bit) {}
Justin Holewinskiae556d32012-05-04 20:18:50 +000030
Craig Topper2865c982014-04-29 07:57:44 +000031 bool hasFP(const MachineFunction &MF) const override;
32 void emitPrologue(MachineFunction &MF) const override;
33 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
Eli Bendersky8da87162013-02-21 20:05:00 +000034
35 void eliminateCallFramePseudoInstr(MachineFunction &MF,
Craig Topper2865c982014-04-29 07:57:44 +000036 MachineBasicBlock &MBB,
37 MachineBasicBlock::iterator I) const override;
Justin Holewinskiae556d32012-05-04 20:18:50 +000038};
39
40} // End llvm namespace
41
42#endif