LLVM  8.0.1
Public Member Functions | List of all members
llvm::NVPTXInstrInfo Class Reference

#include "Target/NVPTX/NVPTXInstrInfo.h"

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

Public Member Functions

 NVPTXInstrInfo ()
 
const NVPTXRegisterInfogetRegisterInfo () const
 
void copyPhysReg (MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const DebugLoc &DL, unsigned DestReg, unsigned SrcReg, bool KillSrc) const override
 
bool 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. More...
 
unsigned removeBranch (MachineBasicBlock &MBB, int *BytesRemoved=nullptr) const override
 
unsigned insertBranch (MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, ArrayRef< MachineOperand > Cond, const DebugLoc &DL, int *BytesAdded=nullptr) const override
 

Detailed Description

Definition at line 26 of file NVPTXInstrInfo.h.

Constructor & Destructor Documentation

◆ NVPTXInstrInfo()

NVPTXInstrInfo::NVPTXInstrInfo ( )
explicit

Definition at line 31 of file NVPTXInstrInfo.cpp.

Member Function Documentation

◆ analyzeBranch()

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 96 of file NVPTXInstrInfo.cpp.

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

Referenced by getRegisterInfo().

◆ copyPhysReg()

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

◆ getRegisterInfo()

const NVPTXRegisterInfo& llvm::NVPTXInstrInfo::getRegisterInfo ( ) const
inline

◆ insertBranch()

unsigned NVPTXInstrInfo::insertBranch ( MachineBasicBlock MBB,
MachineBasicBlock TBB,
MachineBasicBlock FBB,
ArrayRef< MachineOperand Cond,
const DebugLoc DL,
int *  BytesAdded = nullptr 
) const
override

◆ removeBranch()

unsigned NVPTXInstrInfo::removeBranch ( MachineBasicBlock MBB,
int *  BytesRemoved = nullptr 
) const
override

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