2012-05-04 20:18:50 +00:00
|
|
|
//===--- NVPTXFrameLowering.h - Define frame lowering for NVPTX -*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef NVPTX_FRAMELOWERING_H
|
|
|
|
#define NVPTX_FRAMELOWERING_H
|
|
|
|
|
|
|
|
#include "llvm/Target/TargetFrameLowering.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class NVPTXTargetMachine;
|
|
|
|
|
|
|
|
class NVPTXFrameLowering : public TargetFrameLowering {
|
|
|
|
NVPTXTargetMachine &tm;
|
|
|
|
bool is64bit;
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit NVPTXFrameLowering(NVPTXTargetMachine &_tm, bool _is64bit)
|
2013-03-30 14:29:21 +00:00
|
|
|
: TargetFrameLowering(TargetFrameLowering::StackGrowsUp, 8, 0), tm(_tm),
|
|
|
|
is64bit(_is64bit) {}
|
2012-05-04 20:18:50 +00:00
|
|
|
|
2014-04-29 07:57:44 +00:00
|
|
|
bool hasFP(const MachineFunction &MF) const override;
|
|
|
|
void emitPrologue(MachineFunction &MF) const override;
|
|
|
|
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
|
2013-02-21 20:05:00 +00:00
|
|
|
|
|
|
|
void eliminateCallFramePseudoInstr(MachineFunction &MF,
|
2014-04-29 07:57:44 +00:00
|
|
|
MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator I) const override;
|
2012-05-04 20:18:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End llvm namespace
|
|
|
|
|
|
|
|
#endif
|