blob: ee87b3997e78e865c7e4728d742286186e73e96b [file] [log] [blame]
Justin Holewinski49683f32012-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
19
20namespace llvm {
21class NVPTXTargetMachine;
22
23class NVPTXFrameLowering : public TargetFrameLowering {
24 NVPTXTargetMachine &tm;
25 bool is64bit;
26
27public:
28 explicit NVPTXFrameLowering(NVPTXTargetMachine &_tm, bool _is64bit)
29 : TargetFrameLowering(TargetFrameLowering::StackGrowsUp, 8, 0),
30 tm(_tm), is64bit(_is64bit) {}
31
32 virtual bool hasFP(const MachineFunction &MF) const;
33 virtual void emitPrologue(MachineFunction &MF) const;
34 virtual void emitEpilogue(MachineFunction &MF,
35 MachineBasicBlock &MBB) const;
36};
37
38} // End llvm namespace
39
40#endif