1 //===-- Nios2InstrInfo.h - Nios2 Instruction Information --------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the Nios2 implementation of the TargetInstrInfo class.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_NIOS2_NIOS2INSTRINFO_H
15 #define LLVM_LIB_TARGET_NIOS2_NIOS2INSTRINFO_H
17 #include "Nios2RegisterInfo.h"
18 #include "llvm/CodeGen/TargetInstrInfo.h"
20 #define GET_INSTRINFO_HEADER
21 #include "Nios2GenInstrInfo.inc"
27 class Nios2InstrInfo : public Nios2GenInstrInfo {
28 const Nios2RegisterInfo RI;
29 const Nios2Subtarget &Subtarget;
30 virtual void anchor();
33 explicit Nios2InstrInfo(Nios2Subtarget &ST);
35 /// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As
36 /// such, whenever a client has an instance of instruction info, it should
37 /// always be able to get register info as well (through this method).
39 const Nios2RegisterInfo &getRegisterInfo() const { return RI; };
41 bool expandPostRAPseudo(MachineInstr &MI) const override;
43 void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI,
44 const DebugLoc &DL, unsigned DestReg, unsigned SrcReg,
45 bool KillSrc) const override;