mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-01 16:33:37 +01:00
561d71ce7b
to MCRegisterInfo. Also initialize the mapping at construction time. This patch eliminate TargetRegisterInfo from TargetAsmInfo. It's another step towards fixing the layering violation. llvm-svn: 135424
54 lines
1.6 KiB
C++
54 lines
1.6 KiB
C++
//===- 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"
|
|
|
|
#define GET_REGINFO_HEADER
|
|
#include "PTXGenRegisterInfo.inc"
|
|
|
|
namespace llvm {
|
|
class PTXTargetMachine;
|
|
class MachineFunction;
|
|
|
|
struct PTXRegisterInfo : public PTXGenRegisterInfo {
|
|
PTXRegisterInfo(PTXTargetMachine &TM,
|
|
const TargetInstrInfo &TII);
|
|
|
|
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
|
|
}
|
|
|
|
virtual void eliminateFrameIndex(MachineBasicBlock::iterator II,
|
|
int SPAdj,
|
|
RegScavenger *RS = NULL) const;
|
|
|
|
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
|