LLVM 22.0.0git
llvm::CSKYInstrInfo Class Reference

#include "Target/CSKY/CSKYInstrInfo.h"

Inheritance diagram for llvm::CSKYInstrInfo:
[legend]

Public Member Functions

 CSKYInstrInfo (const CSKYSubtarget &STI)
Register isLoadFromStackSlot (const MachineInstr &MI, int &FrameIndex) const override
Register isStoreToStackSlot (const MachineInstr &MI, int &FrameIndex) const override
void storeRegToStackSlot (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, Register SrcReg, bool IsKill, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI, Register VReg, MachineInstr::MIFlag Flags=MachineInstr::NoFlags) const override
void loadRegFromStackSlot (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, Register DestReg, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI, Register VReg, MachineInstr::MIFlag Flags=MachineInstr::NoFlags) const override
void copyPhysReg (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const DebugLoc &DL, Register DestReg, Register SrcReg, bool KillSrc, bool RenamableDest=false, bool RenamableSrc=false) const override
unsigned insertBranch (MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, ArrayRef< MachineOperand > Cond, const DebugLoc &DL, int *BytesAdded=nullptr) const override
bool analyzeBranch (MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl< MachineOperand > &Cond, bool AllowModify=false) const override
unsigned removeBranch (MachineBasicBlock &MBB, int *BytesRemoved=nullptr) const override
bool reverseBranchCondition (SmallVectorImpl< MachineOperand > &Cond) const override
MachineBasicBlockgetBranchDestBlock (const MachineInstr &MI) const override
unsigned getInstSizeInBytes (const MachineInstr &MI) const override
Register getGlobalBaseReg (MachineFunction &MF) const
Register movImm (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, uint64_t Val, MachineInstr::MIFlag Flag=MachineInstr::NoFlags) const

Protected Attributes

const CSKYSubtargetSTI

Detailed Description

Definition at line 26 of file CSKYInstrInfo.h.

Constructor & Destructor Documentation

◆ CSKYInstrInfo()

CSKYInstrInfo::CSKYInstrInfo ( const CSKYSubtarget & STI)
explicit

Definition at line 27 of file CSKYInstrInfo.cpp.

References STI.

Member Function Documentation

◆ analyzeBranch()

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

◆ copyPhysReg()

void CSKYInstrInfo::copyPhysReg ( MachineBasicBlock & MBB,
MachineBasicBlock::iterator MI,
const DebugLoc & DL,
Register DestReg,
Register SrcReg,
bool KillSrc,
bool RenamableDest = false,
bool RenamableSrc = false ) const
override

◆ getBranchDestBlock()

MachineBasicBlock * CSKYInstrInfo::getBranchDestBlock ( const MachineInstr & MI) const
override

Definition at line 147 of file CSKYInstrInfo.cpp.

References assert(), and MI.

Referenced by analyzeBranch().

◆ getGlobalBaseReg()

◆ getInstSizeInBytes()

unsigned CSKYInstrInfo::getInstSizeInBytes ( const MachineInstr & MI) const
override

◆ insertBranch()

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

◆ isLoadFromStackSlot()

Register CSKYInstrInfo::isLoadFromStackSlot ( const MachineInstr & MI,
int & FrameIndex ) const
override

Definition at line 334 of file CSKYInstrInfo.cpp.

References MI.

◆ isStoreToStackSlot()

Register CSKYInstrInfo::isStoreToStackSlot ( const MachineInstr & MI,
int & FrameIndex ) const
override

Definition at line 364 of file CSKYInstrInfo.cpp.

References MI.

◆ loadRegFromStackSlot()

◆ movImm()

◆ removeBranch()

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

Definition at line 114 of file CSKYInstrInfo.cpp.

References getInstSizeInBytes(), I, and MBB.

◆ reverseBranchCondition()

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

Definition at line 218 of file CSKYInstrInfo.cpp.

References assert(), Cond, llvm::getImm(), and getOppositeBranchOpc().

◆ storeRegToStackSlot()

Member Data Documentation

◆ STI

const CSKYSubtarget& llvm::CSKYInstrInfo::STI
protected

Definition at line 33 of file CSKYInstrInfo.h.

Referenced by copyPhysReg(), CSKYInstrInfo(), and movImm().


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