2017-09-19 19:54:29 +08:00
|
|
|
//===-- Nios2InstrInfo.h - Nios2 Instruction Information --------*- 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 Nios2 implementation of the TargetInstrInfo class.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_LIB_TARGET_NIOS2_NIOS2INSTRINFO_H
|
|
|
|
#define LLVM_LIB_TARGET_NIOS2_NIOS2INSTRINFO_H
|
|
|
|
|
|
|
|
#include "Nios2RegisterInfo.h"
|
2017-11-08 09:01:31 +08:00
|
|
|
#include "llvm/CodeGen/TargetInstrInfo.h"
|
2017-09-19 19:54:29 +08:00
|
|
|
|
|
|
|
#define GET_INSTRINFO_HEADER
|
|
|
|
#include "Nios2GenInstrInfo.inc"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
2017-12-07 20:35:02 +08:00
|
|
|
class Nios2Subtarget;
|
|
|
|
|
2017-09-19 19:54:29 +08:00
|
|
|
class Nios2InstrInfo : public Nios2GenInstrInfo {
|
|
|
|
const Nios2RegisterInfo RI;
|
2017-12-07 20:35:02 +08:00
|
|
|
const Nios2Subtarget &Subtarget;
|
|
|
|
virtual void anchor();
|
2017-09-19 19:54:29 +08:00
|
|
|
|
|
|
|
public:
|
2017-12-07 20:35:02 +08:00
|
|
|
explicit Nios2InstrInfo(Nios2Subtarget &ST);
|
2017-09-19 19:54:29 +08:00
|
|
|
|
|
|
|
/// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As
|
|
|
|
/// such, whenever a client has an instance of instruction info, it should
|
|
|
|
/// always be able to get register info as well (through this method).
|
|
|
|
///
|
2017-12-07 20:35:02 +08:00
|
|
|
const Nios2RegisterInfo &getRegisterInfo() const { return RI; };
|
|
|
|
|
|
|
|
bool expandPostRAPseudo(MachineInstr &MI) const override;
|
2017-09-19 19:54:29 +08:00
|
|
|
};
|
|
|
|
} // namespace llvm
|
|
|
|
|
|
|
|
#endif
|