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

#include "Target/CSKY/CSKYInstrInfo.h"

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

Public Member Functions

 CSKYInstrInfo (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) const override
 
void loadRegFromStackSlot (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, Register DestReg, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI, Register VReg) const override
 
void copyPhysReg (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const DebugLoc &DL, MCRegister DestReg, MCRegister SrcReg, bool KillSrc) 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 ( CSKYSubtarget STI)
explicit

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,
MCRegister  DestReg,
MCRegister  SrcReg,
bool  KillSrc 
) const
override

◆ getBranchDestBlock()

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

Definition at line 146 of file CSKYInstrInfo.cpp.

References assert(), and MI.

Referenced by analyzeBranch().

◆ getGlobalBaseReg()

Register CSKYInstrInfo::getGlobalBaseReg ( MachineFunction MF) const

◆ 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 333 of file CSKYInstrInfo.cpp.

References MI.

◆ isStoreToStackSlot()

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

Definition at line 363 of file CSKYInstrInfo.cpp.

References MI.

◆ loadRegFromStackSlot()

void CSKYInstrInfo::loadRegFromStackSlot ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MI,
Register  DestReg,
int  FrameIndex,
const TargetRegisterClass RC,
const TargetRegisterInfo TRI,
Register  VReg 
) const
override

◆ movImm()

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

◆ removeBranch()

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

◆ reverseBranchCondition()

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

Definition at line 217 of file CSKYInstrInfo.cpp.

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

◆ storeRegToStackSlot()

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

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: