2005-03-17 18:17:03 +00:00
|
|
|
//===- IA64InstrInfo.h - IA64 Instruction Information ----------*- C++ -*- ===//
|
2005-04-21 23:13:11 +00:00
|
|
|
//
|
2005-03-17 18:17:03 +00:00
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-29 20:36:04 +00:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2005-04-21 23:13:11 +00:00
|
|
|
//
|
2005-03-17 18:17:03 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file contains the IA64 implementation of the TargetInstrInfo class.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef IA64INSTRUCTIONINFO_H
|
|
|
|
#define IA64INSTRUCTIONINFO_H
|
|
|
|
|
|
|
|
#include "llvm/Target/TargetInstrInfo.h"
|
|
|
|
#include "IA64RegisterInfo.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
2008-01-01 01:03:04 +00:00
|
|
|
class IA64InstrInfo : public TargetInstrInfoImpl {
|
2005-03-17 18:17:03 +00:00
|
|
|
const IA64RegisterInfo RI;
|
|
|
|
public:
|
|
|
|
IA64InstrInfo();
|
|
|
|
|
|
|
|
/// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As
|
|
|
|
/// such, whenever a client has an instance of instruction info, it should
|
|
|
|
/// always be able to get register info as well (through this method).
|
|
|
|
///
|
2008-05-14 01:58:56 +00:00
|
|
|
virtual const IA64RegisterInfo &getRegisterInfo() const { return RI; }
|
2005-03-17 18:17:03 +00:00
|
|
|
|
2009-01-20 19:12:24 +00:00
|
|
|
/// Return true if the instruction is a register to register move and return
|
|
|
|
/// the source and dest operands and their sub-register indices by reference.
|
|
|
|
virtual bool isMoveInstr(const MachineInstr &MI,
|
|
|
|
unsigned &SrcReg, unsigned &DstReg,
|
|
|
|
unsigned &SrcSubIdx, unsigned &DstSubIdx) const;
|
2007-05-18 00:05:48 +00:00
|
|
|
virtual unsigned InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
|
|
|
|
MachineBasicBlock *FBB,
|
2008-08-14 22:49:33 +00:00
|
|
|
const SmallVectorImpl<MachineOperand> &Cond) const;
|
2008-08-26 18:03:31 +00:00
|
|
|
virtual bool copyRegToReg(MachineBasicBlock &MBB,
|
2007-12-31 06:32:00 +00:00
|
|
|
MachineBasicBlock::iterator MI,
|
|
|
|
unsigned DestReg, unsigned SrcReg,
|
|
|
|
const TargetRegisterClass *DestRC,
|
|
|
|
const TargetRegisterClass *SrcRC) const;
|
2008-01-01 21:11:32 +00:00
|
|
|
virtual void storeRegToStackSlot(MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator MI,
|
|
|
|
unsigned SrcReg, bool isKill, int FrameIndex,
|
|
|
|
const TargetRegisterClass *RC) const;
|
|
|
|
|
|
|
|
virtual void storeRegToAddr(MachineFunction &MF, unsigned SrcReg, bool isKill,
|
|
|
|
SmallVectorImpl<MachineOperand> &Addr,
|
|
|
|
const TargetRegisterClass *RC,
|
|
|
|
SmallVectorImpl<MachineInstr*> &NewMIs) const;
|
|
|
|
|
|
|
|
virtual void loadRegFromStackSlot(MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator MI,
|
|
|
|
unsigned DestReg, int FrameIndex,
|
|
|
|
const TargetRegisterClass *RC) const;
|
|
|
|
|
|
|
|
virtual void loadRegFromAddr(MachineFunction &MF, unsigned DestReg,
|
|
|
|
SmallVectorImpl<MachineOperand> &Addr,
|
|
|
|
const TargetRegisterClass *RC,
|
|
|
|
SmallVectorImpl<MachineInstr*> &NewMIs) const;
|
2005-03-17 18:17:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End llvm namespace
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|