2012-02-18 12:03:15 +00:00
|
|
|
//===-- PTXRegisterInfo.h - PTX Register Information Impl -------*- C++ -*-===//
|
2010-09-18 18:52:28 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file contains the PTX implementation of the MRegisterInfo class.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef PTX_REGISTER_INFO_H
|
|
|
|
#define PTX_REGISTER_INFO_H
|
|
|
|
|
|
|
|
#include "llvm/Support/ErrorHandling.h"
|
|
|
|
#include "llvm/ADT/BitVector.h"
|
|
|
|
|
2011-06-27 18:32:37 +00:00
|
|
|
#define GET_REGINFO_HEADER
|
|
|
|
#include "PTXGenRegisterInfo.inc"
|
2010-09-18 18:52:28 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class PTXTargetMachine;
|
|
|
|
class MachineFunction;
|
|
|
|
|
|
|
|
struct PTXRegisterInfo : public PTXGenRegisterInfo {
|
2011-09-26 16:20:25 +00:00
|
|
|
private:
|
|
|
|
const TargetInstrInfo &TII;
|
|
|
|
|
|
|
|
public:
|
2010-09-18 18:52:28 +00:00
|
|
|
PTXRegisterInfo(PTXTargetMachine &TM,
|
2011-09-26 16:20:25 +00:00
|
|
|
const TargetInstrInfo &tii);
|
2010-09-18 18:52:28 +00:00
|
|
|
|
2012-03-04 03:33:22 +00:00
|
|
|
virtual const uint16_t
|
2010-09-18 18:52:28 +00:00
|
|
|
*getCalleeSavedRegs(const MachineFunction *MF = 0) const {
|
2012-03-04 03:33:22 +00:00
|
|
|
static const uint16_t CalleeSavedRegs[] = { 0 };
|
2010-09-18 18:52:28 +00:00
|
|
|
return CalleeSavedRegs; // save nothing
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual BitVector getReservedRegs(const MachineFunction &MF) const {
|
|
|
|
BitVector Reserved(getNumRegs());
|
|
|
|
return Reserved; // reserve no regs
|
|
|
|
}
|
|
|
|
|
2011-06-22 16:07:03 +00:00
|
|
|
virtual void eliminateFrameIndex(MachineBasicBlock::iterator II,
|
2010-09-18 18:52:28 +00:00
|
|
|
int SPAdj,
|
2011-06-22 16:07:03 +00:00
|
|
|
RegScavenger *RS = NULL) const;
|
2010-09-18 18:52:28 +00:00
|
|
|
|
|
|
|
virtual unsigned getFrameRegister(const MachineFunction &MF) const {
|
|
|
|
llvm_unreachable("PTX does not have a frame register");
|
|
|
|
}
|
|
|
|
}; // struct PTXRegisterInfo
|
|
|
|
} // namespace llvm
|
|
|
|
|
|
|
|
#endif // PTX_REGISTER_INFO_H
|