2011-01-10 20:39:04 +08:00
|
|
|
//===--- PTXFrameLowering.h - Define frame lowering for PTX --*- C++ -*----===//
|
2010-11-15 08:06:54 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef PTX_FRAMEINFO_H
|
|
|
|
#define PTX_FRAMEINFO_H
|
|
|
|
|
|
|
|
#include "PTX.h"
|
|
|
|
#include "PTXSubtarget.h"
|
2011-01-10 20:39:04 +08:00
|
|
|
#include "llvm/Target/TargetFrameLowering.h"
|
2010-11-15 08:06:54 +08:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class PTXSubtarget;
|
|
|
|
|
2011-01-10 20:39:04 +08:00
|
|
|
class PTXFrameLowering : public TargetFrameLowering {
|
2010-11-15 08:06:54 +08:00
|
|
|
protected:
|
|
|
|
const PTXSubtarget &STI;
|
|
|
|
|
|
|
|
public:
|
2011-01-10 20:39:04 +08:00
|
|
|
explicit PTXFrameLowering(const PTXSubtarget &sti)
|
2011-03-03 21:34:29 +08:00
|
|
|
: TargetFrameLowering(TargetFrameLowering::StackGrowsDown, 2, -2),
|
|
|
|
STI(sti) {
|
2010-11-15 08:06:54 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/// emitProlog/emitEpilog - These methods insert prolog and epilog code into
|
|
|
|
/// the function.
|
|
|
|
void emitPrologue(MachineFunction &MF) const;
|
|
|
|
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
|
2010-11-19 05:19:35 +08:00
|
|
|
|
|
|
|
bool hasFP(const MachineFunction &MF) const { return false; }
|
2010-11-15 08:06:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End llvm namespace
|
|
|
|
|
|
|
|
#endif
|