LLVM API Documentation

Public Member Functions
llvm::HexagonInstrInfo Class Reference

#include <HexagonInstrInfo.h>

Inheritance diagram for llvm::HexagonInstrInfo:
Inheritance graph
[legend]
Collaboration diagram for llvm::HexagonInstrInfo:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 HexagonInstrInfo (HexagonSubtarget &ST)
const HexagonRegisterInfogetRegisterInfo () const
unsigned isLoadFromStackSlot (const MachineInstr *MI, int &FrameIndex) const override
unsigned isStoreToStackSlot (const MachineInstr *MI, int &FrameIndex) const override
bool AnalyzeBranch (MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl< MachineOperand > &Cond, bool AllowModify) const override
unsigned RemoveBranch (MachineBasicBlock &MBB) const override
unsigned InsertBranch (MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, const SmallVectorImpl< MachineOperand > &Cond, DebugLoc DL) const override
bool analyzeCompare (const MachineInstr *MI, unsigned &SrcReg, unsigned &SrcReg2, int &Mask, int &Value) const override
 For a comparison instruction, return the source registers in SrcReg and SrcReg2 if having two register operands, and the value it compares against in CmpValue. Return true if the comparison instruction can be analyzed.
void copyPhysReg (MachineBasicBlock &MBB, MachineBasicBlock::iterator I, DebugLoc DL, unsigned DestReg, unsigned SrcReg, bool KillSrc) const override
void storeRegToStackSlot (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned SrcReg, bool isKill, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const override
void storeRegToAddr (MachineFunction &MF, unsigned SrcReg, bool isKill, SmallVectorImpl< MachineOperand > &Addr, const TargetRegisterClass *RC, SmallVectorImpl< MachineInstr * > &NewMIs) const
void loadRegFromStackSlot (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned DestReg, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const override
void loadRegFromAddr (MachineFunction &MF, unsigned DestReg, SmallVectorImpl< MachineOperand > &Addr, const TargetRegisterClass *RC, SmallVectorImpl< MachineInstr * > &NewMIs) const
MachineInstrfoldMemoryOperandImpl (MachineFunction &MF, MachineInstr *MI, const SmallVectorImpl< unsigned > &Ops, int FrameIndex) const override
MachineInstrfoldMemoryOperandImpl (MachineFunction &MF, MachineInstr *MI, const SmallVectorImpl< unsigned > &Ops, MachineInstr *LoadMI) const override
unsigned createVR (MachineFunction *MF, MVT VT) const
bool isBranch (const MachineInstr *MI) const
bool isPredicable (MachineInstr *MI) const override
bool PredicateInstruction (MachineInstr *MI, const SmallVectorImpl< MachineOperand > &Cond) const override
bool isProfitableToIfCvt (MachineBasicBlock &MBB, unsigned NumCycles, unsigned ExtraPredCycles, const BranchProbability &Probability) const override
bool isProfitableToIfCvt (MachineBasicBlock &TMBB, unsigned NumTCycles, unsigned ExtraTCycles, MachineBasicBlock &FMBB, unsigned NumFCycles, unsigned ExtraFCycles, const BranchProbability &Probability) const override
bool isPredicated (const MachineInstr *MI) const override
bool isPredicated (unsigned Opcode) const
bool isPredicatedTrue (const MachineInstr *MI) const
bool isPredicatedTrue (unsigned Opcode) const
bool isPredicatedNew (const MachineInstr *MI) const
bool isPredicatedNew (unsigned Opcode) const
bool DefinesPredicate (MachineInstr *MI, std::vector< MachineOperand > &Pred) const override
bool SubsumesPredicate (const SmallVectorImpl< MachineOperand > &Pred1, const SmallVectorImpl< MachineOperand > &Pred2) const override
bool ReverseBranchCondition (SmallVectorImpl< MachineOperand > &Cond) const override
bool isProfitableToDupForIfCvt (MachineBasicBlock &MBB, unsigned NumCycles, const BranchProbability &Probability) const override
DFAPacketizerCreateTargetScheduleState (const TargetMachine *TM, const ScheduleDAG *DAG) const override
bool isSchedulingBoundary (const MachineInstr *MI, const MachineBasicBlock *MBB, const MachineFunction &MF) const override
bool isValidOffset (const int Opcode, const int Offset) const
bool isValidAutoIncImm (const EVT VT, const int Offset) const
bool isMemOp (const MachineInstr *MI) const
bool isSpillPredRegOp (const MachineInstr *MI) const
bool isU6_3Immediate (const int value) const
bool isU6_2Immediate (const int value) const
bool isU6_1Immediate (const int value) const
bool isU6_0Immediate (const int value) const
bool isS4_3Immediate (const int value) const
bool isS4_2Immediate (const int value) const
bool isS4_1Immediate (const int value) const
bool isS4_0Immediate (const int value) const
bool isS12_Immediate (const int value) const
bool isU6_Immediate (const int value) const
bool isS8_Immediate (const int value) const
bool isS6_Immediate (const int value) const
bool isSaveCalleeSavedRegsCall (const MachineInstr *MI) const
bool isConditionalTransfer (const MachineInstr *MI) const
bool isConditionalALU32 (const MachineInstr *MI) const
bool isConditionalLoad (const MachineInstr *MI) const
bool isConditionalStore (const MachineInstr *MI) const
bool isNewValueInst (const MachineInstr *MI) const
bool isNewValue (const MachineInstr *MI) const
bool isDotNewInst (const MachineInstr *MI) const
int GetDotOldOp (const int opc) const
int GetDotNewOp (const MachineInstr *MI) const
int GetDotNewPredOp (MachineInstr *MI, const MachineBranchProbabilityInfo *MBPI) const
bool mayBeNewStore (const MachineInstr *MI) const
bool isDeallocRet (const MachineInstr *MI) const
unsigned getInvertedPredicatedOpcode (const int Opc) const
bool isExtendable (const MachineInstr *MI) const
bool isExtended (const MachineInstr *MI) const
bool isPostIncrement (const MachineInstr *MI) const
bool isNewValueStore (const MachineInstr *MI) const
bool isNewValueStore (unsigned Opcode) const
bool isNewValueJump (const MachineInstr *MI) const
bool isNewValueJumpCandidate (const MachineInstr *MI) const
void immediateExtend (MachineInstr *MI) const
bool isConstExtended (MachineInstr *MI) const
int getDotNewPredJumpOp (MachineInstr *MI, const MachineBranchProbabilityInfo *MBPI) const
unsigned getAddrMode (const MachineInstr *MI) const
bool isOperandExtended (const MachineInstr *MI, unsigned short OperandNum) const
unsigned short getCExtOpNum (const MachineInstr *MI) const
int getMinValue (const MachineInstr *MI) const
int getMaxValue (const MachineInstr *MI) const
bool NonExtEquivalentExists (const MachineInstr *MI) const
short getNonExtOpcode (const MachineInstr *MI) const
bool PredOpcodeHasJMP_c (Opcode_t Opcode) const
bool PredOpcodeHasNot (Opcode_t Opcode) const

Detailed Description

Definition at line 30 of file HexagonInstrInfo.h.


Constructor & Destructor Documentation

Definition at line 64 of file HexagonInstrInfo.cpp.


Member Function Documentation

bool HexagonInstrInfo::AnalyzeBranch ( MachineBasicBlock MBB,
MachineBasicBlock *&  TBB,
MachineBasicBlock *&  FBB,
SmallVectorImpl< MachineOperand > &  Cond,
bool  AllowModify 
) const [override]
bool HexagonInstrInfo::analyzeCompare ( const MachineInstr MI,
unsigned SrcReg,
unsigned SrcReg2,
int Mask,
int Value 
) const [override]

For a comparison instruction, return the source registers in SrcReg and SrcReg2 if having two register operands, and the value it compares against in CmpValue. Return true if the comparison instruction can be analyzed.

Definition at line 342 of file HexagonInstrInfo.cpp.

References llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), and llvm::MachineOperand::getReg().

void HexagonInstrInfo::copyPhysReg ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  I,
DebugLoc  DL,
unsigned  DestReg,
unsigned  SrcReg,
bool  KillSrc 
) const [override]
bool HexagonInstrInfo::DefinesPredicate ( MachineInstr MI,
std::vector< MachineOperand > &  Pred 
) const [override]
MachineInstr * HexagonInstrInfo::foldMemoryOperandImpl ( MachineFunction MF,
MachineInstr MI,
const SmallVectorImpl< unsigned > &  Ops,
int  FrameIndex 
) const [override]

Definition at line 558 of file HexagonInstrInfo.cpp.

Definition at line 110 of file HexagonInstrInfo.h.

Definition at line 1553 of file HexagonInstrInfo.cpp.

References llvm::MachineInstr::getOpcode(), and llvm_unreachable.

Definition at line 1537 of file HexagonInstrInfo.cpp.

References isNewValueStore(), isPredicated(), and isPredicatedNew().

Definition at line 733 of file HexagonInstrInfo.cpp.

References isPredicatedTrue(), and llvm_unreachable.

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).

Definition at line 43 of file HexagonInstrInfo.h.

Referenced by llvm::HexagonSubtarget::getRegisterInfo(), INITIALIZE_PASS(), isConditionalALU32(), isConditionalLoad(), isConditionalStore(), mayBeNewStore(), and llvm::VirtRegMap::runOnMachineFunction().

Definition at line 624 of file HexagonInstrInfo.cpp.

References llvm::MachineInstr::getDesc(), and llvm::MCInstrDesc::isBranch().

Referenced by isNewValueJump().

Definition at line 1278 of file HexagonInstrInfo.cpp.

References llvm::MachineInstr::getOpcode().

Definition at line 1082 of file HexagonInstrInfo.cpp.

References llvm::MachineInstr::getOpcode().

Definition at line 1523 of file HexagonInstrInfo.cpp.

References isNewValueInst(), isPredicated(), and isPredicatedNew().

unsigned HexagonInstrInfo::isLoadFromStackSlot ( const MachineInstr MI,
int FrameIndex 
) const [override]

isLoadFromStackSlot - If the specified machine instruction is a direct load from a stack slot, return the virtual or physical register number of the destination along with the FrameIndex of the loaded stack slot. If not, return 0. This predicate must return 0 if the instruction has any side effects other than loading from the stack slot.

Definition at line 75 of file HexagonInstrInfo.cpp.

References llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isFI(), and llvm::MachineOperand::isImm().

Definition at line 628 of file HexagonInstrInfo.cpp.

References isNewValueJump(), and isNewValueStore().

Referenced by isDotNewInst().

Definition at line 1506 of file HexagonInstrInfo.cpp.

References isBranch(), and isNewValue().

Referenced by isNewValueInst().

Definition at line 1264 of file HexagonInstrInfo.cpp.

References llvm::MachineInstr::getOpcode().

bool HexagonInstrInfo::isOperandExtended ( const MachineInstr MI,
unsigned short  OperandNum 
) const

Definition at line 1512 of file HexagonInstrInfo.cpp.

References getAddrMode(), and llvm::HexagonII::PostInc.

Referenced by GetPostIncrementOperand().

bool HexagonInstrInfo::isPredicable ( MachineInstr MI) const [override]
bool HexagonInstrInfo::isProfitableToDupForIfCvt ( MachineBasicBlock MBB,
unsigned  NumCycles,
const BranchProbability Probability 
) const [override]

Definition at line 1077 of file HexagonInstrInfo.cpp.

bool HexagonInstrInfo::isProfitableToIfCvt ( MachineBasicBlock MBB,
unsigned  NumCycles,
unsigned  ExtraPredCycles,
const BranchProbability Probability 
) const [override]

Definition at line 956 of file HexagonInstrInfo.cpp.

bool HexagonInstrInfo::isProfitableToIfCvt ( MachineBasicBlock TMBB,
unsigned  NumTCycles,
unsigned  ExtraTCycles,
MachineBasicBlock FMBB,
unsigned  NumFCycles,
unsigned  ExtraFCycles,
const BranchProbability Probability 
) const [override]

Definition at line 966 of file HexagonInstrInfo.cpp.

Definition at line 638 of file HexagonInstrInfo.cpp.

References llvm::MachineInstr::getOpcode().

unsigned HexagonInstrInfo::isStoreToStackSlot ( const MachineInstr MI,
int FrameIndex 
) const [override]

isStoreToStackSlot - If the specified machine instruction is a direct store to a stack slot, return the virtual or physical register number of the source reg along with the FrameIndex of the loaded stack slot. If not, return 0. This predicate must return 0 if the instruction has any side effects other than storing to the stack slot.

Definition at line 102 of file HexagonInstrInfo.cpp.

References llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isFI(), and llvm::MachineOperand::isImm().

bool HexagonInstrInfo::isValidOffset ( const int  Opcode,
const int  Offset 
) const

Definition at line 550 of file HexagonInstrInfo.cpp.

References llvm_unreachable.

void HexagonInstrInfo::loadRegFromStackSlot ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MBBI,
unsigned  DestReg,
int  FrameIndex,
const TargetRegisterClass RC,
const TargetRegisterInfo TRI 
) const [override]

Definition at line 1846 of file HexagonInstrInfo.cpp.

Referenced by AnalyzeBranch().

Definition at line 1855 of file HexagonInstrInfo.cpp.

Referenced by AnalyzeBranch().

Definition at line 310 of file HexagonInstrInfo.cpp.

References llvm::MachineBasicBlock::begin(), llvm::MachineBasicBlock::end(), and I.

Referenced by InsertBranch().

void HexagonInstrInfo::storeRegToAddr ( MachineFunction MF,
unsigned  SrcReg,
bool  isKill,
SmallVectorImpl< MachineOperand > &  Addr,
const TargetRegisterClass RC,
SmallVectorImpl< MachineInstr * > &  NewMIs 
) const

Definition at line 508 of file HexagonInstrInfo.cpp.

References llvm_unreachable.

void HexagonInstrInfo::storeRegToStackSlot ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MBBI,
unsigned  SrcReg,
bool  isKill,
int  FrameIndex,
const TargetRegisterClass RC,
const TargetRegisterInfo TRI 
) const [override]

Definition at line 1054 of file HexagonInstrInfo.cpp.


The documentation for this class was generated from the following files: