LLVM API Documentation

Thumb1InstrInfo.h
Go to the documentation of this file.
00001 //===-- Thumb1InstrInfo.h - Thumb-1 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-1 implementation of the TargetInstrInfo class.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef THUMB1INSTRUCTIONINFO_H
00015 #define THUMB1INSTRUCTIONINFO_H
00016 
00017 #include "ARM.h"
00018 #include "ARMBaseInstrInfo.h"
00019 #include "Thumb1RegisterInfo.h"
00020 
00021 namespace llvm {
00022   class ARMSubtarget;
00023 
00024 class Thumb1InstrInfo : public ARMBaseInstrInfo {
00025   Thumb1RegisterInfo RI;
00026 public:
00027   explicit Thumb1InstrInfo(const ARMSubtarget &STI);
00028 
00029   /// getNoopForMachoTarget - Return the noop instruction to use for a noop.
00030   void getNoopForMachoTarget(MCInst &NopInst) const;
00031 
00032   // Return the non-pre/post incrementing version of 'Opc'. Return 0
00033   // if there is not such an opcode.
00034   unsigned getUnindexedOpcode(unsigned Opc) const;
00035 
00036   /// getRegisterInfo - TargetInstrInfo is a superset of MRegister info.  As
00037   /// such, whenever a client has an instance of instruction info, it should
00038   /// always be able to get register info as well (through this method).
00039   ///
00040   const Thumb1RegisterInfo &getRegisterInfo() const { return RI; }
00041 
00042   void copyPhysReg(MachineBasicBlock &MBB,
00043                    MachineBasicBlock::iterator I, DebugLoc DL,
00044                    unsigned DestReg, unsigned SrcReg,
00045                    bool KillSrc) const;
00046   void storeRegToStackSlot(MachineBasicBlock &MBB,
00047                            MachineBasicBlock::iterator MBBI,
00048                            unsigned SrcReg, bool isKill, int FrameIndex,
00049                            const TargetRegisterClass *RC,
00050                            const TargetRegisterInfo *TRI) const;
00051 
00052   void loadRegFromStackSlot(MachineBasicBlock &MBB,
00053                             MachineBasicBlock::iterator MBBI,
00054                             unsigned DestReg, int FrameIndex,
00055                             const TargetRegisterClass *RC,
00056                             const TargetRegisterInfo *TRI) const;
00057 
00058 };
00059 }
00060 
00061 #endif // THUMB1INSTRUCTIONINFO_H