2012-02-18 12:03:15 +00:00
|
|
|
//===-- PTXFrameLowering.h - Define frame lowering for PTX -----*- C++ -*--===//
|
2010-11-15 00:06:54 +00: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 12:39:04 +00:00
|
|
|
#include "llvm/Target/TargetFrameLowering.h"
|
2010-11-15 00:06:54 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class PTXSubtarget;
|
|
|
|
|
2011-01-10 12:39:04 +00:00
|
|
|
class PTXFrameLowering : public TargetFrameLowering {
|
2010-11-15 00:06:54 +00:00
|
|
|
protected:
|
|
|
|
const PTXSubtarget &STI;
|
|
|
|
|
|
|
|
public:
|
2011-01-10 12:39:04 +00:00
|
|
|
explicit PTXFrameLowering(const PTXSubtarget &sti)
|
2011-03-03 13:34:29 +00:00
|
|
|
: TargetFrameLowering(TargetFrameLowering::StackGrowsDown, 2, -2),
|
|
|
|
STI(sti) {
|
2010-11-15 00:06:54 +00: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-18 21:19:35 +00:00
|
|
|
|
|
|
|
bool hasFP(const MachineFunction &MF) const { return false; }
|
2010-11-15 00:06:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End llvm namespace
|
|
|
|
|
|
|
|
#endif
|