LLVM: llvm::LoongArchInstrInfo Class Reference (original) (raw)

#include "[Target/LoongArch/LoongArchInstrInfo.h](LoongArchInstrInfo%5F8h%5Fsource.html)"

Public Member Functions
LoongArchInstrInfo (const LoongArchSubtarget &STI)
const LoongArchRegisterInfo & getRegisterInfo () const
MCInst getNop () const override
void copyPhysReg (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, Register DstReg, Register 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, Register VReg, MachineInstr::MIFlag Flags=MachineInstr::NoFlags) const override
void loadRegFromStackSlot (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, Register DstReg, int FrameIndex, const TargetRegisterClass *RC, Register VReg, MachineInstr::MIFlag Flags=MachineInstr::NoFlags) 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
MachineBasicBlock * getBranchDestBlock (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 isSafeToMove (const MachineInstr &MI, const MachineBasicBlock *MBB, const MachineFunction &MF) 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, unsigned > decomposeMachineOperandsTargetFlags (unsigned TF) const override
ArrayRef< std::pair< unsigned, const char * > > getSerializableDirectMachineOperandTargetFlags () const override
ArrayRef< std::pair< unsigned, const char * > > getSerializableBitmaskMachineOperandTargetFlags () const override
bool canFoldIntoAddrMode (const MachineInstr &MemI, Register Reg, const MachineInstr &AddrI, ExtAddrMode &AM) const override
MachineInstr * emitLdStWithAddr (MachineInstr &MemI, const ExtAddrMode &AM) const override

Definition at line 26 of file LoongArchInstrInfo.h.

analyzeBranch()

canFoldIntoAddrMode()

Definition at line 768 of file LoongArchInstrInfo.cpp.

References llvm::ExtAddrMode::BaseReg, llvm::ExtAddrMode::Basic, llvm::ExtAddrMode::Displacement, llvm::ExtAddrMode::Form, llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isImm(), llvm::isInt(), llvm::MachineOperand::isReg(), llvm::isShiftedInt(), llvm::ExtAddrMode::Scale, llvm::ExtAddrMode::ScaledReg, llvm::SignExtend64(), and STI.

copyPhysReg()

Definition at line 40 of file LoongArchInstrInfo.cpp.

References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), contains(), DL, llvm::get(), llvm::getKillRegState(), llvm_unreachable, MBB, MBBI, and Opc.

decomposeMachineOperandsTargetFlags()

emitLdStWithAddr()

Definition at line 881 of file LoongArchInstrInfo.cpp.

References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::ExtAddrMode::BaseReg, llvm::BuildMI(), llvm::RegState::Define, llvm::ExtAddrMode::Displacement, DL, llvm::get(), llvm::MachineInstr::getDebugLoc(), llvm::MachineInstr::getFlags(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineInstr::mayLoad(), MBB, llvm::MachineInstr::memoperands(), llvm::ExtAddrMode::Scale, llvm::ExtAddrMode::ScaledReg, llvm::MachineInstrBuilder::setMemRefs(), and llvm::MachineInstrBuilder::setMIFlags().

getBranchDestBlock()

getInstSizeInBytes()

getNop()

MCInst LoongArchInstrInfo::getNop ( ) const override

getRegisterInfo()

getSerializableBitmaskMachineOperandTargetFlags()

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

getSerializableDirectMachineOperandTargetFlags()

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

insertBranch()

Definition at line 579 of file LoongArchInstrInfo.cpp.

References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addMBB(), assert(), llvm::BuildMI(), Cond, DL, llvm::get(), llvm::getImm(), getInstSizeInBytes(), MBB, MI, and TBB.

insertIndirectBranch()

Definition at line 617 of file LoongArchInstrInfo.cpp.

References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMBB(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::MachineBasicBlock::back(), llvm::BuildMI(), DL, llvm::MachineBasicBlock::end(), llvm::get(), llvm::LoongArchMachineFunctionInfo::getBranchRelaxationSpillFrameIndex(), llvm::MachineFunction::getInfo(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::MachineInstr::getOperand(), llvm::MachineFunction::getRegInfo(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), II, llvm::isInt(), llvm::RegState::Kill, loadRegFromStackSlot(), MBB, llvm::LoongArchII::MO_PCREL_HI, llvm::LoongArchII::MO_PCREL_LO, MRI, Register, llvm::report_fatal_error(), llvm::MachineOperand::setMBB(), STI, storeRegToStackSlot(), and TRI.

isAsCheapAsAMove()

isBranchOffsetInRange()

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

isSafeToMove()

Definition at line 381 of file LoongArchInstrInfo.cpp.

References llvm::LoongArchII::getDirectFlags(), llvm::MachineFunction::getSubtarget(), MBB, MI, llvm::LoongArchII::MO_DESC64_PC_HI, llvm::LoongArchII::MO_DESC64_PC_LO, llvm::LoongArchII::MO_DESC_CALL, llvm::LoongArchII::MO_DESC_LD, llvm::LoongArchII::MO_DESC_PC_HI, llvm::LoongArchII::MO_DESC_PC_LO, llvm::LoongArchII::MO_GD_PC_HI, llvm::LoongArchII::MO_GOT_PC64_HI, llvm::LoongArchII::MO_GOT_PC64_LO, llvm::LoongArchII::MO_GOT_PC_HI, llvm::LoongArchII::MO_GOT_PC_LO, llvm::LoongArchII::MO_IE_PC64_HI, llvm::LoongArchII::MO_IE_PC64_LO, llvm::LoongArchII::MO_IE_PC_HI, llvm::LoongArchII::MO_IE_PC_LO, llvm::LoongArchII::MO_LD_PC_HI, llvm::LoongArchII::MO_PCREL64_HI, llvm::LoongArchII::MO_PCREL64_LO, llvm::LoongArchII::MO_PCREL_HI, llvm::LoongArchII::MO_PCREL_LO, and STI.

Referenced by isSchedulingBoundary().

isSchedulingBoundary()

loadRegFromStackSlot()

Definition at line 150 of file LoongArchInstrInfo.cpp.

References llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMemOperand(), llvm::BuildMI(), DL, llvm::get(), llvm::MachinePointerInfo::getFixedStack(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getMachineMemOperand(), llvm::MachineFrameInfo::getObjectAlign(), llvm::MachineFrameInfo::getObjectSize(), I, llvm_unreachable, MBB, and llvm::MachineMemOperand::MOLoad.

Referenced by insertIndirectBranch().

movImm()

Definition at line 188 of file LoongArchInstrInfo.cpp.

References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), DL, llvm::LoongArchMatInt::generateInstSeq(), llvm::get(), llvm::isInt(), llvm::RegState::Kill, MBB, MBBI, llvm::report_fatal_error(), llvm::MachineInstrBuilder::setMIFlag(), and STI.

removeBranch()

reverseBranchCondition()

storeRegToStackSlot()

Definition at line 113 of file LoongArchInstrInfo.cpp.

References llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMemOperand(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::dwarf_linker::DebugLoc, llvm::get(), llvm::MachinePointerInfo::getFixedStack(), llvm::MachineFunction::getFrameInfo(), llvm::getKillRegState(), llvm::MachineFunction::getMachineMemOperand(), llvm::MachineFrameInfo::getObjectAlign(), llvm::MachineFrameInfo::getObjectSize(), I, llvm_unreachable, MBB, llvm::MachineMemOperand::MOStore, and TRI.

Referenced by insertIndirectBranch().

STI


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