| Nikolai Bozhenov | ebbde14 | 2017-09-19 11:54:29 +0000 | [diff] [blame] | 1 | //===-- Nios2InstrInfo.h - Nios2 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 Nios2 implementation of the TargetInstrInfo class. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef LLVM_LIB_TARGET_NIOS2_NIOS2INSTRINFO_H |
| 15 | #define LLVM_LIB_TARGET_NIOS2_NIOS2INSTRINFO_H |
| 16 | |
| Nikolai Bozhenov | ebbde14 | 2017-09-19 11:54:29 +0000 | [diff] [blame] | 17 | #include "Nios2RegisterInfo.h" |
| David Blaikie | 3f833ed | 2017-11-08 01:01:31 +0000 | [diff] [blame] | 18 | #include "llvm/CodeGen/TargetInstrInfo.h" |
| Nikolai Bozhenov | ebbde14 | 2017-09-19 11:54:29 +0000 | [diff] [blame] | 19 | |
| 20 | #define GET_INSTRINFO_HEADER |
| 21 | #include "Nios2GenInstrInfo.inc" |
| 22 | |
| 23 | namespace llvm { |
| 24 | |
| Nikolai Bozhenov | 1cf9c54 | 2017-12-07 12:35:02 +0000 | [diff] [blame] | 25 | class Nios2Subtarget; |
| 26 | |
| Nikolai Bozhenov | ebbde14 | 2017-09-19 11:54:29 +0000 | [diff] [blame] | 27 | class Nios2InstrInfo : public Nios2GenInstrInfo { |
| Nikolai Bozhenov | ebbde14 | 2017-09-19 11:54:29 +0000 | [diff] [blame] | 28 | const Nios2RegisterInfo RI; |
| Nikolai Bozhenov | 1cf9c54 | 2017-12-07 12:35:02 +0000 | [diff] [blame] | 29 | const Nios2Subtarget &Subtarget; |
| 30 | virtual void anchor(); |
| Nikolai Bozhenov | ebbde14 | 2017-09-19 11:54:29 +0000 | [diff] [blame] | 31 | |
| 32 | public: |
| Nikolai Bozhenov | 1cf9c54 | 2017-12-07 12:35:02 +0000 | [diff] [blame] | 33 | explicit Nios2InstrInfo(Nios2Subtarget &ST); |
| Nikolai Bozhenov | ebbde14 | 2017-09-19 11:54:29 +0000 | [diff] [blame] | 34 | |
| 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). |
| 38 | /// |
| Nikolai Bozhenov | 1cf9c54 | 2017-12-07 12:35:02 +0000 | [diff] [blame] | 39 | const Nios2RegisterInfo &getRegisterInfo() const { return RI; }; |
| 40 | |
| 41 | bool expandPostRAPseudo(MachineInstr &MI) const override; |
| Nikolai Bozhenov | eededda | 2018-01-09 11:15:08 +0000 | [diff] [blame] | 42 | |
| 43 | void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, |
| 44 | const DebugLoc &DL, unsigned DestReg, unsigned SrcReg, |
| 45 | bool KillSrc) const override; |
| Nikolai Bozhenov | ebbde14 | 2017-09-19 11:54:29 +0000 | [diff] [blame] | 46 | }; |
| 47 | } // namespace llvm |
| 48 | |
| 49 | #endif |