blob: d34e7bec1da013c268cd0b10ee91a2e29d09904d [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
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;
Eli Bendersky8da87162013-02-21 20:05:00 +000036
37 void eliminateCallFramePseudoInstr(MachineFunction &MF,
38 MachineBasicBlock &MBB,
39 MachineBasicBlock::iterator I) const;
Justin Holewinskiae556d32012-05-04 20:18:50 +000040};
41
42} // End llvm namespace
43
44#endif