2010-09-18 20:52:28 +02:00
|
|
|
//===- PTXRegisterInfo.h - PTX Register Information Impl --------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// 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 20:32:37 +02:00
|
|
|
#define GET_REGINFO_HEADER
|
|
|
|
#include "PTXGenRegisterInfo.inc"
|
2010-09-18 20:52:28 +02:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class PTXTargetMachine;
|
|
|
|
class MachineFunction;
|
|
|
|
|
|
|
|
struct PTXRegisterInfo : public PTXGenRegisterInfo {
|
2011-09-26 18:20:25 +02:00
|
|
|
private:
|
|
|
|
const TargetInstrInfo &TII;
|
|
|
|
|
|
|
|
public:
|
2010-09-18 20:52:28 +02:00
|
|
|
PTXRegisterInfo(PTXTargetMachine &TM,
|
2011-09-26 18:20:25 +02:00
|
|
|
const TargetInstrInfo &tii);
|
2010-09-18 20:52:28 +02:00
|
|
|
|
|
|
|
virtual const unsigned
|
|
|
|
*getCalleeSavedRegs(const MachineFunction *MF = 0) const {
|
|
|
|
static const unsigned CalleeSavedRegs[] = { 0 };
|
|
|
|
return CalleeSavedRegs; // save nothing
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual BitVector getReservedRegs(const MachineFunction &MF) const {
|
|
|
|
BitVector Reserved(getNumRegs());
|
|
|
|
return Reserved; // reserve no regs
|
|
|
|
}
|
|
|
|
|
2011-06-22 18:07:03 +02:00
|
|
|
virtual void eliminateFrameIndex(MachineBasicBlock::iterator II,
|
2010-09-18 20:52:28 +02:00
|
|
|
int SPAdj,
|
2011-06-22 18:07:03 +02:00
|
|
|
RegScavenger *RS = NULL) const;
|
2010-09-18 20:52:28 +02:00
|
|
|
|
|
|
|
virtual unsigned getFrameRegister(const MachineFunction &MF) const {
|
|
|
|
llvm_unreachable("PTX does not have a frame register");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}; // struct PTXRegisterInfo
|
|
|
|
} // namespace llvm
|
|
|
|
|
|
|
|
#endif // PTX_REGISTER_INFO_H
|