Justin Holewinski | 49683f3 | 2012-05-04 20:18:50 +0000 | [diff] [blame] | 1 | //===--- 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 | |
| 20 | namespace llvm { |
| 21 | class NVPTXTargetMachine; |
| 22 | |
| 23 | class NVPTXFrameLowering : public TargetFrameLowering { |
| 24 | NVPTXTargetMachine &tm; |
| 25 | bool is64bit; |
| 26 | |
| 27 | public: |
| 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 |