LLVM API Documentation

Public Member Functions
llvm::NVPTXInstrInfo Class Reference

#include <NVPTXInstrInfo.h>

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

List of all members.

Public Member Functions

 NVPTXInstrInfo (NVPTXSubtarget &STI)
const NVPTXRegisterInfogetRegisterInfo () const
void copyPhysReg (MachineBasicBlock &MBB, MachineBasicBlock::iterator I, DebugLoc DL, unsigned DestReg, unsigned SrcReg, bool KillSrc) const override
virtual bool isMoveInstr (const MachineInstr &MI, unsigned &SrcReg, unsigned &DestReg) const
bool isLoadInstr (const MachineInstr &MI, unsigned &AddrSpace) const
bool isStoreInstr (const MachineInstr &MI, unsigned &AddrSpace) const
bool isReadSpecialReg (MachineInstr &MI) const
virtual bool CanTailMerge (const MachineInstr *MI) const
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
unsigned getLdStCodeAddrSpace (const MachineInstr &MI) const

Detailed Description

Definition at line 26 of file NVPTXInstrInfo.h.


Constructor & Destructor Documentation

Definition at line 32 of file NVPTXInstrInfo.cpp.


Member Function Documentation

bool NVPTXInstrInfo::AnalyzeBranch ( MachineBasicBlock MBB,
MachineBasicBlock *&  TBB,
MachineBasicBlock *&  FBB,
SmallVectorImpl< MachineOperand > &  Cond,
bool  AllowModify 
) const [override]

AnalyzeBranch - Analyze the branching code at the end of MBB, returning true if it cannot be understood (e.g. it's a switch dispatch or isn't implemented for a target). Upon success, this returns false and returns with the following information in various cases:

1. If this block ends with no branches (it just falls through to its succ) just return false, leaving TBB/FBB null. 2. If this block ends with only an unconditional branch, it sets TBB to be the destination block. 3. If this block ends with an conditional branch and it falls through to an successor block, it sets TBB to be the branch destination block and a list of operands that evaluate the condition. These operands can be passed to other TargetInstrInfo methods to create new branches. 4. If this block ends with an conditional branch and an unconditional block, it returns the 'true' destination in TBB, the 'false' destination in FBB, and a list of operands that evaluate the condition. These operands can be passed to other TargetInstrInfo methods to create new branches.

Note that RemoveBranch and InsertBranch must be implemented to support cases where this method returns success.

Definition at line 170 of file NVPTXInstrInfo.cpp.

References llvm::MachineBasicBlock::begin(), llvm::MachineBasicBlock::end(), llvm::MachineInstr::eraseFromParent(), llvm::MachineOperand::getMBB(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), I, and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().

void NVPTXInstrInfo::copyPhysReg ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  I,
DebugLoc  DL,
unsigned  DestReg,
unsigned  SrcReg,
bool  KillSrc 
) const [override]

Definition at line 70 of file NVPTXInstrInfo.h.

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

Referenced by isLoadInstr(), and isStoreInstr().

Definition at line 32 of file NVPTXInstrInfo.h.

Referenced by llvm::NVPTXSubtarget::getRegisterInfo().

bool NVPTXInstrInfo::isLoadInstr ( const MachineInstr MI,
unsigned AddrSpace 
) const
bool NVPTXInstrInfo::isMoveInstr ( const MachineInstr MI,
unsigned SrcReg,
unsigned DestReg 
) const [virtual]

Definition at line 91 of file NVPTXInstrInfo.cpp.

References llvm::MachineInstr::getOpcode().

bool NVPTXInstrInfo::isStoreInstr ( const MachineInstr MI,
unsigned AddrSpace 
) const

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