LLVM API Documentation
00001 //===- Thumb2InstrInfo.h - Thumb-2 Instruction Information ----------*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file contains the Thumb-2 implementation of the TargetInstrInfo class. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef THUMB2INSTRUCTIONINFO_H 00015 #define THUMB2INSTRUCTIONINFO_H 00016 00017 #include "llvm/Target/TargetInstrInfo.h" 00018 #include "ARM.h" 00019 #include "ARMInstrInfo.h" 00020 #include "Thumb2RegisterInfo.h" 00021 00022 namespace llvm { 00023 class ARMSubtarget; 00024 00025 class Thumb2InstrInfo : public ARMBaseInstrInfo { 00026 Thumb2RegisterInfo RI; 00027 public: 00028 explicit Thumb2InstrInfo(const ARMSubtarget &STI); 00029 00030 // Return the non-pre/post incrementing version of 'Opc'. Return 0 00031 // if there is not such an opcode. 00032 unsigned getUnindexedOpcode(unsigned Opc) const; 00033 00034 // Return true if the block does not fall through. 00035 bool BlockHasNoFallThrough(const MachineBasicBlock &MBB) const; 00036 00037 bool copyRegToReg(MachineBasicBlock &MBB, 00038 MachineBasicBlock::iterator I, 00039 unsigned DestReg, unsigned SrcReg, 00040 const TargetRegisterClass *DestRC, 00041 const TargetRegisterClass *SrcRC) const; 00042 00043 void storeRegToStackSlot(MachineBasicBlock &MBB, 00044 MachineBasicBlock::iterator MBBI, 00045 unsigned SrcReg, bool isKill, int FrameIndex, 00046 const TargetRegisterClass *RC) const; 00047 00048 void loadRegFromStackSlot(MachineBasicBlock &MBB, 00049 MachineBasicBlock::iterator MBBI, 00050 unsigned DestReg, int FrameIndex, 00051 const TargetRegisterClass *RC) const; 00052 00053 /// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As 00054 /// such, whenever a client has an instance of instruction info, it should 00055 /// always be able to get register info as well (through this method). 00056 /// 00057 const Thumb2RegisterInfo &getRegisterInfo() const { return RI; } 00058 }; 00059 } 00060 00061 #endif // THUMB2INSTRUCTIONINFO_H