LLVM 20.0.0git
Public Member Functions | List of all members
llvm::XtensaInstrInfo Class Reference

#include "Target/Xtensa/XtensaInstrInfo.h"

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

Public Member Functions

 XtensaInstrInfo (const XtensaSubtarget &STI)
 
void adjustStackPtr (unsigned SP, int64_t Amount, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const
 Adjust SP by Amount bytes.
 
unsigned getInstSizeInBytes (const MachineInstr &MI) const override
 
const XtensaRegisterInfogetRegisterInfo () const
 
Register isLoadFromStackSlot (const MachineInstr &MI, int &FrameIndex) const override
 
Register isStoreToStackSlot (const MachineInstr &MI, int &FrameIndex) const override
 
void copyPhysReg (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, MCRegister DestReg, MCRegister SrcReg, bool KillSrc, bool RenamableDest=false, bool RenamableSrc=false) 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 DestReg, int FrameIdx, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI, Register VReg) const override
 
void getLoadStoreOpcodes (const TargetRegisterClass *RC, unsigned &LoadOpcode, unsigned &StoreOpcode, int64_t offset) const
 
void loadImmediate (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned *Reg, int64_t Value) const
 
bool reverseBranchCondition (SmallVectorImpl< MachineOperand > &Cond) const override
 
MachineBasicBlockgetBranchDestBlock (const MachineInstr &MI) const override
 
bool isBranchOffsetInRange (unsigned BranchOpc, int64_t BrOffset) 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
 
void insertIndirectBranch (MachineBasicBlock &MBB, MachineBasicBlock &DestBB, MachineBasicBlock &RestoreBB, const DebugLoc &DL, int64_t BrOffset=0, RegScavenger *RS=nullptr) const override
 
unsigned insertBranchAtInst (MachineBasicBlock &MBB, MachineBasicBlock::iterator I, MachineBasicBlock *TBB, ArrayRef< MachineOperand > Cond, const DebugLoc &DL, int *BytesAdded) const
 
unsigned insertConstBranchAtInst (MachineBasicBlock &MBB, MachineInstr *I, int64_t offset, ArrayRef< MachineOperand > Cond, DebugLoc DL, int *BytesAdded) const
 
bool isBranch (const MachineBasicBlock::iterator &MI, SmallVectorImpl< MachineOperand > &Cond, const MachineOperand *&Target) const
 
const XtensaSubtargetgetSubtarget () const
 

Detailed Description

Definition at line 31 of file XtensaInstrInfo.h.

Constructor & Destructor Documentation

◆ XtensaInstrInfo()

XtensaInstrInfo::XtensaInstrInfo ( const XtensaSubtarget STI)

Definition at line 50 of file XtensaInstrInfo.cpp.

Member Function Documentation

◆ adjustStackPtr()

void XtensaInstrInfo::adjustStackPtr ( unsigned  SP,
int64_t  Amount,
MachineBasicBlock MBB,
MachineBasicBlock::iterator  I 
) const

◆ analyzeBranch()

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

◆ copyPhysReg()

void XtensaInstrInfo::copyPhysReg ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MBBI,
const DebugLoc DL,
MCRegister  DestReg,
MCRegister  SrcReg,
bool  KillSrc,
bool  RenamableDest = false,
bool  RenamableSrc = false 
) const
override

◆ getBranchDestBlock()

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

Definition at line 263 of file XtensaInstrInfo.cpp.

References llvm_unreachable, and MI.

◆ getInstSizeInBytes()

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

◆ getLoadStoreOpcodes()

void XtensaInstrInfo::getLoadStoreOpcodes ( const TargetRegisterClass RC,
unsigned LoadOpcode,
unsigned StoreOpcode,
int64_t  offset 
) const

Definition at line 147 of file XtensaInstrInfo.cpp.

References assert().

Referenced by loadRegFromStackSlot(), and storeRegToStackSlot().

◆ getRegisterInfo()

const XtensaRegisterInfo & llvm::XtensaInstrInfo::getRegisterInfo ( ) const
inline

Definition at line 44 of file XtensaInstrInfo.h.

Referenced by llvm::XtensaSubtarget::getRegisterInfo().

◆ getSubtarget()

const XtensaSubtarget & llvm::XtensaInstrInfo::getSubtarget ( ) const
inline

Definition at line 125 of file XtensaInstrInfo.h.

◆ insertBranch()

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

◆ insertBranchAtInst()

unsigned XtensaInstrInfo::insertBranchAtInst ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  I,
MachineBasicBlock TBB,
ArrayRef< MachineOperand Cond,
const DebugLoc DL,
int *  BytesAdded 
) const

◆ insertConstBranchAtInst()

unsigned XtensaInstrInfo::insertConstBranchAtInst ( MachineBasicBlock MBB,
MachineInstr I,
int64_t  offset,
ArrayRef< MachineOperand Cond,
DebugLoc  DL,
int *  BytesAdded 
) const

◆ insertIndirectBranch()

void XtensaInstrInfo::insertIndirectBranch ( MachineBasicBlock MBB,
MachineBasicBlock DestBB,
MachineBasicBlock RestoreBB,
const DebugLoc DL,
int64_t  BrOffset = 0,
RegScavenger RS = nullptr 
) const
override

◆ isBranch()

bool XtensaInstrInfo::isBranch ( const MachineBasicBlock::iterator MI,
SmallVectorImpl< MachineOperand > &  Cond,
const MachineOperand *&  Target 
) const

Definition at line 644 of file XtensaInstrInfo.cpp.

References assert(), Cond, and MI.

Referenced by analyzeBranch(), and removeBranch().

◆ isBranchOffsetInRange()

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

Definition at line 295 of file XtensaInstrInfo.cpp.

References llvm::isIntN(), and llvm_unreachable.

◆ isLoadFromStackSlot()

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

Definition at line 54 of file XtensaInstrInfo.cpp.

References MI.

Referenced by llvm::XtensaFrameLowering::emitEpilogue().

◆ isStoreToStackSlot()

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

Definition at line 66 of file XtensaInstrInfo.cpp.

References MI.

Referenced by llvm::XtensaFrameLowering::emitPrologue().

◆ loadImmediate()

void XtensaInstrInfo::loadImmediate ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MBBI,
unsigned Reg,
int64_t  Value 
) const

◆ loadRegFromStackSlot()

void XtensaInstrInfo::loadRegFromStackSlot ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MBBI,
Register  DestReg,
int  FrameIdx,
const TargetRegisterClass RC,
const TargetRegisterInfo TRI,
Register  VReg 
) const
override

◆ removeBranch()

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

◆ reverseBranchCondition()

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

Definition at line 204 of file XtensaInstrInfo.cpp.

References assert(), Cond, and llvm::report_fatal_error().

◆ storeRegToStackSlot()

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

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