SparcInstrInfo.h revision e785e531f4495068ee46cabd926939eec15a565a
1//===- SparcV8InstrInfo.h - SparcV8 Instruction Information -----*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file was developed by the LLVM research group and is distributed under 6// the University of Illinois Open Source License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10// This file contains the SparcV8 implementation of the TargetInstrInfo class. 11// 12//===----------------------------------------------------------------------===// 13 14#ifndef SPARCV8INSTRUCTIONINFO_H 15#define SPARCV8INSTRUCTIONINFO_H 16 17#include "llvm/Target/TargetInstrInfo.h" 18#include "SparcV8RegisterInfo.h" 19 20namespace llvm { 21 22class SparcV8InstrInfo : public TargetInstrInfo { 23 const SparcV8RegisterInfo RI; 24public: 25 SparcV8InstrInfo(); 26 27 /// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As 28 /// such, whenever a client has an instance of instruction info, it should 29 /// always be able to get register info as well (through this method). 30 /// 31 virtual const MRegisterInfo &getRegisterInfo() const { return RI; } 32 33 /// createNOPinstr - returns the target's implementation of NOP, which is 34 /// usually a pseudo-instruction, implemented by a degenerate version of 35 /// another instruction. 36 /// 37 MachineInstr* createNOPinstr() const; 38 39 /// isNOPinstr - not having a special NOP opcode, we need to know if a given 40 /// instruction is interpreted as an `official' NOP instr, i.e., there may be 41 /// more than one way to `do nothing' but only one canonical way to slack off. 42 /// 43 bool isNOPinstr(const MachineInstr &MI) const; 44}; 45 46} 47 48#endif 49