zpu: wip eke out some simple instructions for load/store/add
[llvm/zpu.git] / lib / Target / PTX / PTXInstrInfo.h
blob9d9ffe1d23a253c51e539b3db6060a11247468b1
1 //===- PTXInstrInfo.h - PTX Instruction Information -------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains the PTX implementation of the TargetInstrInfo class.
12 //===----------------------------------------------------------------------===//
14 #ifndef PTX_INSTR_INFO_H
15 #define PTX_INSTR_INFO_H
17 #include "PTXRegisterInfo.h"
18 #include "llvm/Target/TargetInstrInfo.h"
20 namespace llvm {
21 class PTXTargetMachine;
23 class PTXInstrInfo : public TargetInstrInfoImpl {
24 private:
25 const PTXRegisterInfo RI;
26 PTXTargetMachine &TM;
28 public:
29 explicit PTXInstrInfo(PTXTargetMachine &_TM);
31 virtual const PTXRegisterInfo &getRegisterInfo() const { return RI; }
33 virtual void copyPhysReg(MachineBasicBlock &MBB,
34 MachineBasicBlock::iterator I, DebugLoc DL,
35 unsigned DstReg, unsigned SrcReg,
36 bool KillSrc) const;
38 virtual bool copyRegToReg(MachineBasicBlock &MBB,
39 MachineBasicBlock::iterator I,
40 unsigned DstReg, unsigned SrcReg,
41 const TargetRegisterClass *DstRC,
42 const TargetRegisterClass *SrcRC,
43 DebugLoc DL) const;
45 virtual bool isMoveInstr(const MachineInstr& MI,
46 unsigned &SrcReg, unsigned &DstReg,
47 unsigned &SrcSubIdx, unsigned &DstSubIdx) const;
48 }; // class PTXInstrInfo
49 } // namespace llvm
51 #endif // PTX_INSTR_INFO_H