LLVM 24.0.0git
llvm::RISCVLegalizerInfo Class Reference

#include "Target/RISCV/GISel/RISCVLegalizerInfo.h"

Inheritance diagram for llvm::RISCVLegalizerInfo:
[legend]

Public Member Functions

 RISCVLegalizerInfo (const RISCVSubtarget &ST)
bool legalizeCustom (LegalizerHelper &Helper, MachineInstr &MI, LostDebugLocObserver &LocObserver) const override
 Called for instructions with the Custom LegalizationAction.
bool legalizeIntrinsic (LegalizerHelper &Helper, MachineInstr &MI) const override
Public Member Functions inherited from llvm::LegalizerInfo
virtual ~LegalizerInfo ()=default
unsigned getOpcodeIdxForOpcode (unsigned Opcode) const
unsigned getActionDefinitionsIdx (unsigned Opcode) const
void verify (const MCInstrInfo &MII) const
 Perform simple self-diagnostic and assert if there is anything obviously wrong with the actions set up.
const LegalizeRuleSet & getActionDefinitions (unsigned Opcode) const
 Get the action definitions for the given opcode.
LegalizeRuleSet & getActionDefinitionsBuilder (unsigned Opcode)
 Get the action definition builder for the given opcode.
LegalizeRuleSet & getActionDefinitionsBuilder (std::initializer_list< unsigned > Opcodes)
 Get the action definition builder for the given set of opcodes.
void aliasActionDefinitions (unsigned OpcodeTo, unsigned OpcodeFrom)
LegalizeActionStep getAction (const LegalityQuery &Query) const
 Determine what action should be taken to legalize the described instruction.
LegalizeActionStep getAction (const MachineInstr &MI, const MachineRegisterInfo &MRI) const
 Determine what action should be taken to legalize the given generic instruction.
bool isLegal (const LegalityQuery &Query) const
bool isLegalOrCustom (const LegalityQuery &Query) const
bool isLegal (const MachineInstr &MI, const MachineRegisterInfo &MRI) const
bool isLegalOrCustom (const MachineInstr &MI, const MachineRegisterInfo &MRI) const
virtual unsigned getExtOpcodeForWideningConstant (LLT SmallTy) const
 Return the opcode (SEXT/ZEXT/ANYEXT) that should be performed while widening a constant of type SmallTy which targets can override.

Detailed Description

Definition at line 26 of file RISCVLegalizerInfo.h.

Constructor & Destructor Documentation

◆ RISCVLegalizerInfo()

Member Function Documentation

◆ legalizeCustom()

bool RISCVLegalizerInfo::legalizeCustom ( LegalizerHelper & Helper,
MachineInstr & MI,
LostDebugLocObserver & LocObserver ) const
overridevirtual

Called for instructions with the Custom LegalizationAction.

Reimplemented from llvm::LegalizerInfo.

Definition at line 1633 of file RISCVLegalizerInfo.cpp.

References assert(), llvm::APFloat::bitcastToAPInt(), llvm::MachineIRBuilder::buildAnd(), llvm::MachineIRBuilder::buildAnyExt(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildICmp(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildLShr(), llvm::MachineIRBuilder::buildSExtInReg(), llvm::MachineIRBuilder::buildShl(), llvm::MachineIRBuilder::buildTrunc(), llvm::GISelChangeObserver::changedInstr(), llvm::GISelChangeObserver::changingInstr(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::MachineOperand::CreateImm(), F, llvm::MCInstrInfo::get(), llvm::MachineFunction::getFunction(), llvm::getIConstantVRegValWithLookThrough(), llvm::MachineOperand::getImm(), llvm::MachineIRBuilder::getInsertPt(), llvm::MachineIRBuilder::getMBB(), llvm::MachineIRBuilder::getMRI(), getRISCVWOpcode(), llvm::MachineIRBuilder::getTII(), llvm::MachineRegisterInfo::getType(), llvm::ConstantInt::getValue(), High, llvm::CmpInst::ICMP_NE, llvm_unreachable, llvm::LegalizerHelper::lowerAbsToMaxNeg(), llvm::LegalizerHelper::lowerConstant(), MI, llvm::LegalizerHelper::MIRBuilder, llvm::LegalizerHelper::Observer, llvm::RISCVFPRndMode::RMM, llvm::APInt::rotr(), llvm::RISCVFPRndMode::RTZ, llvm::LLT::scalar(), llvm::MachineIRBuilder::setInsertPt(), llvm::MachineOperand::setReg(), llvm::LegalizerHelper::widenScalarDst(), llvm::LegalizerHelper::widenScalarSrc(), and llvm::APInt::zext().

◆ legalizeIntrinsic()


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