1 //===- SPUInstrInfo.h - Cell SPU Instruction Information --------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by a team from the Computer Systems Research
6 // Department at The Aerospace Corporation.
8 // See README.txt for details.
10 //===----------------------------------------------------------------------===//
12 // This file contains the PowerPC implementation of the TargetInstrInfo class.
14 //===----------------------------------------------------------------------===//
16 #ifndef SPU_INSTRUCTIONINFO_H
17 #define SPU_INSTRUCTIONINFO_H
20 #include "llvm/Target/TargetInstrInfo.h"
21 #include "SPURegisterInfo.h"
24 //! Cell SPU instruction information class
25 class SPUInstrInfo : public TargetInstrInfo
28 const SPURegisterInfo RI;
30 SPUInstrInfo(SPUTargetMachine &tm);
32 /// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As
33 /// such, whenever a client has an instance of instruction info, it should
34 /// always be able to get register info as well (through this method).
36 virtual const MRegisterInfo &getRegisterInfo() const { return RI; }
38 /// getPointerRegClass - Return the register class to use to hold pointers.
39 /// This is used for addressing modes.
40 virtual const TargetRegisterClass *getPointerRegClass() const;
42 // Return true if the instruction is a register to register move and
43 // leave the source and dest operands in the passed parameters.
45 virtual bool isMoveInstr(const MachineInstr& MI,
47 unsigned& destReg) const;
49 unsigned isLoadFromStackSlot(MachineInstr *MI, int &FrameIndex) const;
50 unsigned isStoreToStackSlot(MachineInstr *MI, int &FrameIndex) const;