LLVM API Documentation
00001 //===- AlphaInstrInfo.h - Alpha Instruction Information ---------*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file was developed by the LLVM research group and is distributed under 00006 // the University of Illinois Open Source License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file contains the Alpha implementation of the TargetInstrInfo class. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef ALPHAINSTRUCTIONINFO_H 00015 #define ALPHAINSTRUCTIONINFO_H 00016 00017 #include "llvm/Target/TargetInstrInfo.h" 00018 #include "AlphaRegisterInfo.h" 00019 00020 namespace llvm { 00021 00022 class AlphaInstrInfo : public TargetInstrInfo { 00023 const AlphaRegisterInfo RI; 00024 public: 00025 AlphaInstrInfo(); 00026 00027 /// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As 00028 /// such, whenever a client has an instance of instruction info, it should 00029 /// always be able to get register info as well (through this method). 00030 /// 00031 virtual const MRegisterInfo &getRegisterInfo() const { return RI; } 00032 00033 /// Return true if the instruction is a register to register move and 00034 /// leave the source and dest operands in the passed parameters. 00035 /// 00036 virtual bool isMoveInstr(const MachineInstr &MI, 00037 unsigned &SrcReg, unsigned &DstReg) const; 00038 00039 virtual unsigned isLoadFromStackSlot(MachineInstr *MI, int &FrameIndex) const; 00040 virtual unsigned isStoreToStackSlot(MachineInstr *MI, int &FrameIndex) const; 00041 }; 00042 00043 } 00044 00045 #endif