2012-05-05 04:18:50 +08: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
|
|
|
|
|
2014-06-27 10:05:22 +08:00
|
|
|
#include "NVPTXSubtarget.h"
|
2012-05-05 04:18:50 +08:00
|
|
|
#include "llvm/Target/TargetFrameLowering.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class NVPTXFrameLowering : public TargetFrameLowering {
|
|
|
|
bool is64bit;
|
|
|
|
|
|
|
|
public:
|
2014-06-27 10:05:22 +08:00
|
|
|
explicit NVPTXFrameLowering(NVPTXSubtarget &STI)
|
|
|
|
: TargetFrameLowering(TargetFrameLowering::StackGrowsUp, 8, 0),
|
|
|
|
is64bit(STI.is64Bit()) {}
|
2012-05-05 04:18:50 +08:00
|
|
|
|
2014-04-29 15:57:44 +08:00
|
|
|
bool hasFP(const MachineFunction &MF) const override;
|
|
|
|
void emitPrologue(MachineFunction &MF) const override;
|
|
|
|
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
|
2013-02-22 04:05:00 +08:00
|
|
|
|
|
|
|
void eliminateCallFramePseudoInstr(MachineFunction &MF,
|
2014-04-29 15:57:44 +08:00
|
|
|
MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator I) const override;
|
2012-05-05 04:18:50 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End llvm namespace
|
|
|
|
|
|
|
|
#endif
|