LLVM 20.0.0git
Public Member Functions | Protected Attributes | List of all members
llvm::LoongArchInstrInfo Class Reference

#include "Target/LoongArch/LoongArchInstrInfo.h"

Inheritance diagram for llvm::LoongArchInstrInfo:
Inheritance graph
[legend]

Public Member Functions

 LoongArchInstrInfo (LoongArchSubtarget &STI)
 
MCInst getNop () const override
 
void copyPhysReg (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, MCRegister DstReg, MCRegister SrcReg, bool KillSrc) const override
 
void storeRegToStackSlot (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, Register SrcReg, bool IsKill, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI, Register VReg) const override
 
void loadRegFromStackSlot (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, Register DstReg, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI, Register VReg) const override
 
void movImm (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, Register DstReg, uint64_t Val, MachineInstr::MIFlag Flag=MachineInstr::NoFlags) const
 
unsigned getInstSizeInBytes (const MachineInstr &MI) const override
 
bool isAsCheapAsAMove (const MachineInstr &MI) const override
 
MachineBasicBlockgetBranchDestBlock (const MachineInstr &MI) const override
 
bool analyzeBranch (MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl< MachineOperand > &Cond, bool AllowModify) const override
 
bool isBranchOffsetInRange (unsigned BranchOpc, int64_t BrOffset) const override
 
bool isSchedulingBoundary (const MachineInstr &MI, const MachineBasicBlock *MBB, const MachineFunction &MF) const override
 
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
 
void insertIndirectBranch (MachineBasicBlock &MBB, MachineBasicBlock &NewDestBB, MachineBasicBlock &RestoreBB, const DebugLoc &DL, int64_t BrOffset, RegScavenger *RS) const override
 
bool reverseBranchCondition (SmallVectorImpl< MachineOperand > &Cond) const override
 
std::pair< unsigned, unsigneddecomposeMachineOperandsTargetFlags (unsigned TF) const override
 
ArrayRef< std::pair< unsigned, const char * > > getSerializableDirectMachineOperandTargetFlags () const override
 

Protected Attributes

const LoongArchSubtargetSTI
 

Detailed Description

Definition at line 26 of file LoongArchInstrInfo.h.

Constructor & Destructor Documentation

◆ LoongArchInstrInfo()

LoongArchInstrInfo::LoongArchInstrInfo ( LoongArchSubtarget STI)
explicit

Definition at line 27 of file LoongArchInstrInfo.cpp.

Member Function Documentation

◆ analyzeBranch()

bool LoongArchInstrInfo::analyzeBranch ( MachineBasicBlock MBB,
MachineBasicBlock *&  TBB,
MachineBasicBlock *&  FBB,
SmallVectorImpl< MachineOperand > &  Cond,
bool  AllowModify 
) const
override

◆ copyPhysReg()

void LoongArchInstrInfo::copyPhysReg ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MBBI,
const DebugLoc DL,
MCRegister  DstReg,
MCRegister  SrcReg,
bool  KillSrc 
) const
override

◆ decomposeMachineOperandsTargetFlags()

std::pair< unsigned, unsigned > LoongArchInstrInfo::decomposeMachineOperandsTargetFlags ( unsigned  TF) const
override

Definition at line 598 of file LoongArchInstrInfo.cpp.

◆ getBranchDestBlock()

MachineBasicBlock * LoongArchInstrInfo::getBranchDestBlock ( const MachineInstr MI) const
override

Definition at line 248 of file LoongArchInstrInfo.cpp.

References assert(), and MI.

Referenced by analyzeBranch().

◆ getInstSizeInBytes()

unsigned LoongArchInstrInfo::getInstSizeInBytes ( const MachineInstr MI) const
override

◆ getNop()

MCInst LoongArchInstrInfo::getNop ( ) const
override

◆ getSerializableDirectMachineOperandTargetFlags()

ArrayRef< std::pair< unsigned, const char * > > LoongArchInstrInfo::getSerializableDirectMachineOperandTargetFlags ( ) const
override

Definition at line 603 of file LoongArchInstrInfo.cpp.

◆ insertBranch()

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

◆ insertIndirectBranch()

void LoongArchInstrInfo::insertIndirectBranch ( MachineBasicBlock MBB,
MachineBasicBlock NewDestBB,
MachineBasicBlock RestoreBB,
const DebugLoc DL,
int64_t  BrOffset,
RegScavenger RS 
) const
override

◆ isAsCheapAsAMove()

bool LoongArchInstrInfo::isAsCheapAsAMove ( const MachineInstr MI) const
override

Definition at line 232 of file LoongArchInstrInfo.cpp.

References MI.

◆ isBranchOffsetInRange()

bool LoongArchInstrInfo::isBranchOffsetInRange ( unsigned  BranchOpc,
int64_t  BrOffset 
) const
override

Definition at line 327 of file LoongArchInstrInfo.cpp.

References llvm_unreachable.

◆ isSchedulingBoundary()

bool LoongArchInstrInfo::isSchedulingBoundary ( const MachineInstr MI,
const MachineBasicBlock MBB,
const MachineFunction MF 
) const
override

◆ loadRegFromStackSlot()

void LoongArchInstrInfo::loadRegFromStackSlot ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MBBI,
Register  DstReg,
int  FrameIndex,
const TargetRegisterClass RC,
const TargetRegisterInfo TRI,
Register  VReg 
) const
override

◆ movImm()

void LoongArchInstrInfo::movImm ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MBBI,
const DebugLoc DL,
Register  DstReg,
uint64_t  Val,
MachineInstr::MIFlag  Flag = MachineInstr::NoFlags 
) const

◆ removeBranch()

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

◆ reverseBranchCondition()

bool LoongArchInstrInfo::reverseBranchCondition ( SmallVectorImpl< MachineOperand > &  Cond) const
override

Definition at line 590 of file LoongArchInstrInfo.cpp.

References assert(), Cond, and getOppositeBranchOpc().

◆ storeRegToStackSlot()

void LoongArchInstrInfo::storeRegToStackSlot ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MBBI,
Register  SrcReg,
bool  IsKill,
int  FrameIndex,
const TargetRegisterClass RC,
const TargetRegisterInfo TRI,
Register  VReg 
) const
override

Member Data Documentation

◆ STI

const LoongArchSubtarget& llvm::LoongArchInstrInfo::STI
protected

Definition at line 94 of file LoongArchInstrInfo.h.

Referenced by insertIndirectBranch(), and movImm().


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