LLVM  16.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]
Collaboration diagram for llvm::LoongArchInstrInfo:
Collaboration graph
[legend]

Public Member Functions

 LoongArchInstrInfo (LoongArchSubtarget &STI)
 
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) const override
 
void loadRegFromStackSlot (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, Register DstReg, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) 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
 
MachineBasicBlockgetBranchDestBlock (const MachineInstr &MI) const override
 
bool analyzeBranch (MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl< MachineOperand > &Cond, bool AllowModify) 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
 
bool reverseBranchCondition (SmallVectorImpl< MachineOperand > &Cond) 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 23 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

◆ getBranchDestBlock()

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

Definition at line 161 of file LoongArchInstrInfo.cpp.

References assert(), and MI.

Referenced by analyzeBranch().

◆ getInstSizeInBytes()

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

Definition at line 156 of file LoongArchInstrInfo.cpp.

References MI.

Referenced by insertBranch(), and removeBranch().

◆ insertBranch()

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

◆ loadRegFromStackSlot()

void LoongArchInstrInfo::loadRegFromStackSlot ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MBBI,
Register  DstReg,
int  FrameIndex,
const TargetRegisterClass RC,
const TargetRegisterInfo TRI 
) 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 338 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 
) const
override

Member Data Documentation

◆ STI

const LoongArchSubtarget& llvm::LoongArchInstrInfo::STI
protected

Definition at line 70 of file LoongArchInstrInfo.h.

Referenced by movImm().


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