LLVM  13.0.0git
Public Types | Public Member Functions | Public Attributes | List of all members
llvm::LegalizerHelper Class Reference

#include "llvm/CodeGen/GlobalISel/LegalizerHelper.h"

Collaboration diagram for llvm::LegalizerHelper:
Collaboration graph
[legend]

Public Types

enum  LegalizeResult { AlreadyLegal, Legalized, UnableToLegalize }
 

Public Member Functions

const LegalizerInfogetLegalizerInfo () const
 Expose LegalizerInfo so the clients can re-use. More...
 
const TargetLoweringgetTargetLowering () const
 
 LegalizerHelper (MachineFunction &MF, GISelChangeObserver &Observer, MachineIRBuilder &B)
 
 LegalizerHelper (MachineFunction &MF, const LegalizerInfo &LI, GISelChangeObserver &Observer, MachineIRBuilder &B)
 
LegalizeResult legalizeInstrStep (MachineInstr &MI)
 Replace MI by a sequence of legal instructions that can implement the same operation. More...
 
LegalizeResult libcall (MachineInstr &MI)
 Legalize an instruction by emiting a runtime library call instead. More...
 
LegalizeResult narrowScalar (MachineInstr &MI, unsigned TypeIdx, LLT NarrowTy)
 Legalize an instruction by reducing the width of the underlying scalar type. More...
 
LegalizeResult widenScalar (MachineInstr &MI, unsigned TypeIdx, LLT WideTy)
 Legalize an instruction by performing the operation on a wider scalar type (for example a 16-bit addition can be safely performed at 32-bits precision, ignoring the unused bits). More...
 
LegalizeResult bitcast (MachineInstr &MI, unsigned TypeIdx, LLT Ty)
 Legalize an instruction by replacing the value type. More...
 
LegalizeResult lower (MachineInstr &MI, unsigned TypeIdx, LLT Ty)
 Legalize an instruction by splitting it into simpler parts, hopefully understood by the target. More...
 
LegalizeResult fewerElementsVector (MachineInstr &MI, unsigned TypeIdx, LLT NarrowTy)
 Legalize a vector instruction by splitting into multiple components, each acting on the same scalar type as the original but with fewer elements. More...
 
LegalizeResult moreElementsVector (MachineInstr &MI, unsigned TypeIdx, LLT MoreTy)
 Legalize a vector instruction by increasing the number of vector elements involved and ignoring the added elements later. More...
 
Register coerceToScalar (Register Val)
 Cast the given value to an LLT::scalar with an equivalent size. More...
 
void widenScalarSrc (MachineInstr &MI, LLT WideTy, unsigned OpIdx, unsigned ExtOpcode)
 Legalize a single operand OpIdx of the machine instruction MI as a Use by extending the operand's type to WideTy using the specified ExtOpcode for the extension instruction, and replacing the vreg of the operand in place. More...
 
void narrowScalarSrc (MachineInstr &MI, LLT NarrowTy, unsigned OpIdx)
 Legalize a single operand OpIdx of the machine instruction MI as a Use by truncating the operand's type to NarrowTy using G_TRUNC, and replacing the vreg of the operand in place. More...
 
void widenScalarDst (MachineInstr &MI, LLT WideTy, unsigned OpIdx=0, unsigned TruncOpcode=TargetOpcode::G_TRUNC)
 Legalize a single operand OpIdx of the machine instruction MI as a Def by extending the operand's type to WideTy and truncating it back with the TruncOpcode, and replacing the vreg of the operand in place. More...
 
void narrowScalarDst (MachineInstr &MI, LLT NarrowTy, unsigned OpIdx, unsigned ExtOpcode)
 
void moreElementsVectorDst (MachineInstr &MI, LLT MoreTy, unsigned OpIdx)
 Legalize a single operand OpIdx of the machine instruction MI as a Def by performing it with additional vector elements and extracting the result elements, and replacing the vreg of the operand in place. More...
 
void moreElementsVectorSrc (MachineInstr &MI, LLT MoreTy, unsigned OpIdx)
 Legalize a single operand OpIdx of the machine instruction MI as a Use by producing a vector with undefined high elements, extracting the original vector type, and replacing the vreg of the operand in place. More...
 
void bitcastSrc (MachineInstr &MI, LLT CastTy, unsigned OpIdx)
 Legalize a single operand OpIdx of the machine instruction MI as a use by inserting a G_BITCAST to CastTy. More...
 
void bitcastDst (MachineInstr &MI, LLT CastTy, unsigned OpIdx)
 Legalize a single operand OpIdx of the machine instruction MI as a def by inserting a G_BITCAST from CastTy. More...
 
Register widenWithUnmerge (LLT WideTy, Register OrigReg)
 Widen OrigReg to WideTy by merging to a wider type, padding with G_IMPLICIT_DEF, and producing dead results. More...
 
Align getStackTemporaryAlignment (LLT Type, Align MinAlign=Align()) const
 Return the alignment to use for a stack temporary object with the given type. More...
 
MachineInstrBuilder createStackTemporary (TypeSize Bytes, Align Alignment, MachinePointerInfo &PtrInfo)
 Create a stack temporary based on the size in bytes and the alignment. More...
 
Register getVectorElementPointer (Register VecPtr, LLT VecTy, Register Index)
 Get a pointer to vector element Index located in memory for a vector of type VecTy starting at a base address of VecPtr. More...
 
LegalizeResult fewerElementsVectorImplicitDef (MachineInstr &MI, unsigned TypeIdx, LLT NarrowTy)
 
LegalizeResult fewerElementsVectorMultiEltType (MachineInstr &MI, unsigned TypeIdx, LLT NarrowTy)
 Legalize a instruction with a vector type where each operand may have a different element type. More...
 
LegalizeResult fewerElementsVectorCasts (MachineInstr &MI, unsigned TypeIdx, LLT NarrowTy)
 
LegalizeResult fewerElementsVectorCmp (MachineInstr &MI, unsigned TypeIdx, LLT NarrowTy)
 
LegalizeResult fewerElementsVectorSelect (MachineInstr &MI, unsigned TypeIdx, LLT NarrowTy)
 
LegalizeResult fewerElementsVectorPhi (MachineInstr &MI, unsigned TypeIdx, LLT NarrowTy)
 
LegalizeResult moreElementsVectorPhi (MachineInstr &MI, unsigned TypeIdx, LLT MoreTy)
 
LegalizeResult fewerElementsVectorUnmergeValues (MachineInstr &MI, unsigned TypeIdx, LLT NarrowTy)
 
LegalizeResult fewerElementsVectorMerge (MachineInstr &MI, unsigned TypeIdx, LLT NarrowTy)
 
LegalizeResult fewerElementsVectorExtractInsertVectorElt (MachineInstr &MI, unsigned TypeIdx, LLT NarrowTy)
 
LegalizeResult fewerElementsVectorMulo (MachineInstr &MI, unsigned TypeIdx, LLT NarrowTy)
 
LegalizeResult reduceLoadStoreWidth (MachineInstr &MI, unsigned TypeIdx, LLT NarrowTy)
 
LegalizeResult reduceOperationWidth (MachineInstr &MI, unsigned TypeIdx, LLT NarrowTy)
 Legalize an instruction by reducing the operation width, either by narrowing the type of the operation or by reducing the number of elements of a vector. More...
 
LegalizeResult fewerElementsVectorSextInReg (MachineInstr &MI, unsigned TypeIdx, LLT NarrowTy)
 
LegalizeResult narrowScalarShiftByConstant (MachineInstr &MI, const APInt &Amt, LLT HalfTy, LLT ShiftAmtTy)
 
LegalizeResult fewerElementsVectorReductions (MachineInstr &MI, unsigned TypeIdx, LLT NarrowTy)
 
LegalizeResult narrowScalarShift (MachineInstr &MI, unsigned TypeIdx, LLT Ty)
 
LegalizeResult narrowScalarAddSub (MachineInstr &MI, unsigned TypeIdx, LLT NarrowTy)
 
LegalizeResult narrowScalarMul (MachineInstr &MI, LLT Ty)
 
LegalizeResult narrowScalarFPTOI (MachineInstr &MI, unsigned TypeIdx, LLT Ty)
 
LegalizeResult narrowScalarExtract (MachineInstr &MI, unsigned TypeIdx, LLT Ty)
 
LegalizeResult narrowScalarInsert (MachineInstr &MI, unsigned TypeIdx, LLT Ty)
 
LegalizeResult narrowScalarBasic (MachineInstr &MI, unsigned TypeIdx, LLT Ty)
 
LegalizeResult narrowScalarExt (MachineInstr &MI, unsigned TypeIdx, LLT Ty)
 
LegalizeResult narrowScalarSelect (MachineInstr &MI, unsigned TypeIdx, LLT Ty)
 
LegalizeResult narrowScalarCTLZ (MachineInstr &MI, unsigned TypeIdx, LLT Ty)
 
LegalizeResult narrowScalarCTTZ (MachineInstr &MI, unsigned TypeIdx, LLT Ty)
 
LegalizeResult narrowScalarCTPOP (MachineInstr &MI, unsigned TypeIdx, LLT Ty)
 
LegalizeResult bitcastExtractVectorElt (MachineInstr &MI, unsigned TypeIdx, LLT CastTy)
 Perform Bitcast legalize action on G_EXTRACT_VECTOR_ELT. More...
 
LegalizeResult bitcastInsertVectorElt (MachineInstr &MI, unsigned TypeIdx, LLT CastTy)
 Perform Bitcast legalize action on G_INSERT_VECTOR_ELT. More...
 
LegalizeResult lowerBitcast (MachineInstr &MI)
 
LegalizeResult lowerLoad (MachineInstr &MI)
 
LegalizeResult lowerStore (MachineInstr &MI)
 
LegalizeResult lowerBitCount (MachineInstr &MI)
 
LegalizeResult lowerFunnelShiftWithInverse (MachineInstr &MI)
 
LegalizeResult lowerFunnelShiftAsShifts (MachineInstr &MI)
 
LegalizeResult lowerFunnelShift (MachineInstr &MI)
 
LegalizeResult lowerRotateWithReverseRotate (MachineInstr &MI)
 
LegalizeResult lowerRotate (MachineInstr &MI)
 
LegalizeResult lowerU64ToF32BitOps (MachineInstr &MI)
 
LegalizeResult lowerUITOFP (MachineInstr &MI)
 
LegalizeResult lowerSITOFP (MachineInstr &MI)
 
LegalizeResult lowerFPTOUI (MachineInstr &MI)
 
LegalizeResult lowerFPTOSI (MachineInstr &MI)
 
LegalizeResult lowerFPTRUNC_F64_TO_F16 (MachineInstr &MI)
 
LegalizeResult lowerFPTRUNC (MachineInstr &MI)
 
LegalizeResult lowerFPOWI (MachineInstr &MI)
 
LegalizeResult lowerMinMax (MachineInstr &MI)
 
LegalizeResult lowerFCopySign (MachineInstr &MI)
 
LegalizeResult lowerFMinNumMaxNum (MachineInstr &MI)
 
LegalizeResult lowerFMad (MachineInstr &MI)
 
LegalizeResult lowerIntrinsicRound (MachineInstr &MI)
 
LegalizeResult lowerFFloor (MachineInstr &MI)
 
LegalizeResult lowerMergeValues (MachineInstr &MI)
 
LegalizeResult lowerUnmergeValues (MachineInstr &MI)
 
LegalizeResult lowerExtractInsertVectorElt (MachineInstr &MI)
 Lower a vector extract or insert by writing the vector to a stack temporary and reloading the element or vector. More...
 
LegalizeResult lowerShuffleVector (MachineInstr &MI)
 
LegalizeResult lowerDynStackAlloc (MachineInstr &MI)
 
LegalizeResult lowerExtract (MachineInstr &MI)
 
LegalizeResult lowerInsert (MachineInstr &MI)
 
LegalizeResult lowerSADDO_SSUBO (MachineInstr &MI)
 
LegalizeResult lowerAddSubSatToMinMax (MachineInstr &MI)
 
LegalizeResult lowerAddSubSatToAddoSubo (MachineInstr &MI)
 
LegalizeResult lowerShlSat (MachineInstr &MI)
 
LegalizeResult lowerBswap (MachineInstr &MI)
 
LegalizeResult lowerBitreverse (MachineInstr &MI)
 
LegalizeResult lowerReadWriteRegister (MachineInstr &MI)
 
LegalizeResult lowerSMULH_UMULH (MachineInstr &MI)
 
LegalizeResult lowerSelect (MachineInstr &MI)
 
LegalizeResult lowerDIVREM (MachineInstr &MI)
 

Public Attributes

MachineIRBuilderMIRBuilder
 Expose MIRBuilder so clients can set their own RecordInsertInstruction functions. More...
 
GISelChangeObserverObserver
 To keep track of changes made by the LegalizerHelper. More...
 

Detailed Description

Definition at line 37 of file LegalizerHelper.h.

Member Enumeration Documentation

◆ LegalizeResult

Enumerator
AlreadyLegal 

Instruction was already legal and no change was made to the MachineFunction.

Legalized 

Instruction has been legalized and the MachineFunction changed.

UnableToLegalize 

Some kind of error has occurred and we could not legalize this instruction.

Definition at line 52 of file LegalizerHelper.h.

Constructor & Destructor Documentation

◆ LegalizerHelper() [1/2]

LegalizerHelper::LegalizerHelper ( MachineFunction MF,
GISelChangeObserver Observer,
MachineIRBuilder B 
)

Definition at line 90 of file LegalizerHelper.cpp.

◆ LegalizerHelper() [2/2]

LegalizerHelper::LegalizerHelper ( MachineFunction MF,
const LegalizerInfo LI,
GISelChangeObserver Observer,
MachineIRBuilder B 
)

Definition at line 97 of file LegalizerHelper.cpp.

Member Function Documentation

◆ bitcast()

LegalizerHelper::LegalizeResult LegalizerHelper::bitcast ( MachineInstr MI,
unsigned  TypeIdx,
LLT  Ty 
)

◆ bitcastDst()

void LegalizerHelper::bitcastDst ( MachineInstr MI,
LLT  CastTy,
unsigned  OpIdx 
)

◆ bitcastExtractVectorElt()

LegalizerHelper::LegalizeResult LegalizerHelper::bitcastExtractVectorElt ( MachineInstr MI,
unsigned  TypeIdx,
LLT  CastTy 
)

Perform Bitcast legalize action on G_EXTRACT_VECTOR_ELT.

Perform a G_EXTRACT_VECTOR_ELT in a different sized vector element.

If this is casting to a vector with a smaller element size, perform multiple element extracts and merge the results. If this is coercing to a vector with larger elements, index the bitcasted vector and extract the target element with bit operations. This is intended to force the indexing in the native register size for architectures that can dynamically index the register file.

Definition at line 2515 of file LegalizerHelper.cpp.

References llvm::MachineIRBuilder::buildAdd(), llvm::MachineIRBuilder::buildBitcast(), llvm::MachineIRBuilder::buildBuildVector(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildExtractVectorElement(), llvm::MachineIRBuilder::buildLShr(), llvm::MachineIRBuilder::buildMul(), llvm::MachineIRBuilder::buildTrunc(), getBitcastWiderVectorElementOffset(), llvm::LLT::getElementType(), llvm::LLT::getNumElements(), llvm::MachineInstrBuilder::getReg(), llvm::LLT::getSizeInBits(), llvm::MachineRegisterInfo::getType(), I, llvm::isPowerOf2_32(), llvm::LLT::isVector(), Legalized, llvm::Log2_32(), MI, MIRBuilder, llvm::LLT::scalarOrVector(), and UnableToLegalize.

Referenced by bitcast().

◆ bitcastInsertVectorElt()

LegalizerHelper::LegalizeResult LegalizerHelper::bitcastInsertVectorElt ( MachineInstr MI,
unsigned  TypeIdx,
LLT  CastTy 
)

Perform Bitcast legalize action on G_INSERT_VECTOR_ELT.

Perform a G_INSERT_VECTOR_ELT in a different sized vector element.

If this is increasing the element size, perform the indexing in the target element type, and use bit operations to insert at the element position. This is intended for architectures that can dynamically index the register file and want to force indexing in the native register size.

Definition at line 2654 of file LegalizerHelper.cpp.

References llvm::MachineIRBuilder::buildBitcast(), buildBitFieldInsert(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildExtractVectorElement(), llvm::MachineIRBuilder::buildInsertVectorElement(), llvm::MachineIRBuilder::buildLShr(), getBitcastWiderVectorElementOffset(), llvm::LLT::getElementType(), llvm::LLT::getNumElements(), llvm::MachineInstrBuilder::getReg(), llvm::LLT::getSizeInBits(), llvm::MachineRegisterInfo::getType(), llvm::isPowerOf2_32(), llvm::LLT::isVector(), Legalized, llvm::Log2_32(), MI, MIRBuilder, and UnableToLegalize.

Referenced by bitcast().

◆ bitcastSrc()

void LegalizerHelper::bitcastSrc ( MachineInstr MI,
LLT  CastTy,
unsigned  OpIdx 
)

Legalize a single operand OpIdx of the machine instruction MI as a use by inserting a G_BITCAST to CastTy.

Definition at line 1323 of file LegalizerHelper.cpp.

References llvm::MachineIRBuilder::buildBitcast(), llvm::MachineInstrBuilder::getReg(), MI, and MIRBuilder.

Referenced by bitcast().

◆ coerceToScalar()

Register LegalizerHelper::coerceToScalar ( Register  Val)

◆ createStackTemporary()

MachineInstrBuilder LegalizerHelper::createStackTemporary ( TypeSize  Bytes,
Align  Alignment,
MachinePointerInfo PtrInfo 
)

◆ fewerElementsVector()

LegalizerHelper::LegalizeResult LegalizerHelper::fewerElementsVector ( MachineInstr MI,
unsigned  TypeIdx,
LLT  NarrowTy 
)

◆ fewerElementsVectorCasts()

LegalizerHelper::LegalizeResult LegalizerHelper::fewerElementsVectorCasts ( MachineInstr MI,
unsigned  TypeIdx,
LLT  NarrowTy 
)

◆ fewerElementsVectorCmp()

LegalizerHelper::LegalizeResult LegalizerHelper::fewerElementsVectorCmp ( MachineInstr MI,
unsigned  TypeIdx,
LLT  NarrowTy 
)

◆ fewerElementsVectorExtractInsertVectorElt()

LegalizerHelper::LegalizeResult LegalizerHelper::fewerElementsVectorExtractInsertVectorElt ( MachineInstr MI,
unsigned  TypeIdx,
LLT  NarrowTy 
)

◆ fewerElementsVectorImplicitDef()

LegalizerHelper::LegalizeResult LegalizerHelper::fewerElementsVectorImplicitDef ( MachineInstr MI,
unsigned  TypeIdx,
LLT  NarrowTy 
)

◆ fewerElementsVectorMerge()

LegalizerHelper::LegalizeResult LegalizerHelper::fewerElementsVectorMerge ( MachineInstr MI,
unsigned  TypeIdx,
LLT  NarrowTy 
)

Definition at line 3755 of file LegalizerHelper.cpp.

References E, llvm::getGCDType(), llvm::MachineRegisterInfo::getType(), I, Legalized, and MI.

Referenced by fewerElementsVector().

◆ fewerElementsVectorMulo()

LegalizerHelper::LegalizeResult LegalizerHelper::fewerElementsVectorMulo ( MachineInstr MI,
unsigned  TypeIdx,
LLT  NarrowTy 
)

◆ fewerElementsVectorMultiEltType()

LegalizerHelper::LegalizeResult LegalizerHelper::fewerElementsVectorMultiEltType ( MachineInstr MI,
unsigned  TypeIdx,
LLT  NarrowTy 
)

◆ fewerElementsVectorPhi()

LegalizerHelper::LegalizeResult LegalizerHelper::fewerElementsVectorPhi ( MachineInstr MI,
unsigned  TypeIdx,
LLT  NarrowTy 
)

◆ fewerElementsVectorReductions()

LegalizerHelper::LegalizeResult LegalizerHelper::fewerElementsVectorReductions ( MachineInstr MI,
unsigned  TypeIdx,
LLT  NarrowTy 
)

◆ fewerElementsVectorSelect()

LegalizerHelper::LegalizeResult LegalizerHelper::fewerElementsVectorSelect ( MachineInstr MI,
unsigned  TypeIdx,
LLT  NarrowTy 
)

◆ fewerElementsVectorSextInReg()

LegalizerHelper::LegalizeResult LegalizerHelper::fewerElementsVectorSextInReg ( MachineInstr MI,
unsigned  TypeIdx,
LLT  NarrowTy 
)

◆ fewerElementsVectorUnmergeValues()

LegalizerHelper::LegalizeResult LegalizerHelper::fewerElementsVectorUnmergeValues ( MachineInstr MI,
unsigned  TypeIdx,
LLT  NarrowTy 
)

◆ getLegalizerInfo()

const LegalizerInfo& llvm::LegalizerHelper::getLegalizerInfo ( ) const
inline

Expose LegalizerInfo so the clients can re-use.

Definition at line 66 of file LegalizerHelper.h.

◆ getStackTemporaryAlignment()

Align LegalizerHelper::getStackTemporaryAlignment ( LLT  Type,
Align  MinAlign = Align() 
) const

Return the alignment to use for a stack temporary object with the given type.

Definition at line 3225 of file LegalizerHelper.cpp.

References Align, llvm::LLT::getSizeInBytes(), llvm::max(), llvm::MinAlign(), and llvm::PowerOf2Ceil().

Referenced by lowerExtractInsertVectorElt().

◆ getTargetLowering()

const TargetLowering& llvm::LegalizerHelper::getTargetLowering ( ) const
inline

Definition at line 67 of file LegalizerHelper.h.

◆ getVectorElementPointer()

Register LegalizerHelper::getVectorElementPointer ( Register  VecPtr,
LLT  VecTy,
Register  Index 
)

Get a pointer to vector element Index located in memory for a vector of type VecTy starting at a base address of VecPtr.

If Index is out of bounds the returned pointer is unspecified, but will be within the vector bounds.

Definition at line 3266 of file LegalizerHelper.cpp.

References assert(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildMul(), llvm::MachineIRBuilder::buildPtrAdd(), clampDynamicVectorIndex(), llvm::LLT::getElementType(), llvm::MachineInstrBuilder::getReg(), llvm::LLT::getSizeInBits(), llvm::MachineRegisterInfo::getType(), Index, MIRBuilder, and llvm::Mul.

Referenced by lowerExtractInsertVectorElt().

◆ legalizeInstrStep()

LegalizerHelper::LegalizeResult LegalizerHelper::legalizeInstrStep ( MachineInstr MI)

Replace MI by a sequence of legal instructions that can implement the same operation.

Note that this means MI may be deleted, so any iterator steps should be performed before calling this function. Helper should be initialized to the MachineFunction containing MI.

Considered as an opaque blob, the legal code will use and define the same registers as MI.

Definition at line 104 of file LegalizerHelper.cpp.

References AlreadyLegal, llvm::LegalizeActions::Bitcast, bitcast(), llvm::LegalizeActions::Custom, llvm::dbgs(), llvm::LegalizeActions::FewerElements, fewerElementsVector(), llvm::LegalizerInfo::getAction(), llvm::IRSimilarity::Legal, llvm::LegalizerInfo::legalizeCustom(), Legalized, llvm::LegalizerInfo::legalizeIntrinsic(), libcall(), LLVM_DEBUG, llvm::LegalizeActions::Lower, lower(), MI, MIRBuilder, llvm::LegalizeActions::MoreElements, moreElementsVector(), llvm::LegalizeActions::NarrowScalar, narrowScalar(), llvm::MachineIRBuilder::setInstrAndDebugLoc(), UnableToLegalize, llvm::LegalizeActions::WidenScalar, and widenScalar().

Referenced by llvm::Legalizer::legalizeMachineFunction().

◆ libcall()

LegalizerHelper::LegalizeResult LegalizerHelper::libcall ( MachineInstr MI)

◆ lower()

LegalizerHelper::LegalizeResult LegalizerHelper::lower ( MachineInstr MI,
unsigned  TypeIdx,
LLT  Ty 
)

Legalize an instruction by splitting it into simpler parts, hopefully understood by the target.

Definition at line 2921 of file LegalizerHelper.cpp.

References Addr, assert(), llvm::MachineIRBuilder::buildAdd(), llvm::MachineIRBuilder::buildAShr(), llvm::MachineIRBuilder::buildAtomicCmpXchg(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildFAdd(), llvm::MachineIRBuilder::buildFNeg(), llvm::MachineIRBuilder::buildICmp(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildMul(), llvm::MachineIRBuilder::buildSelect(), llvm::MachineIRBuilder::buildShl(), llvm::MachineIRBuilder::buildSub(), llvm::MachineIRBuilder::buildXor(), llvm::MachineIRBuilder::buildZExt(), llvm::GISelChangeObserver::changedInstr(), llvm::GISelChangeObserver::changingInstr(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::MachineIRBuilder::getInsertPt(), llvm::MachineIRBuilder::getMBB(), llvm::LLT::getScalarSizeInBits(), llvm::APInt::getSignMask(), llvm::LLT::getSizeInBits(), llvm::MachineIRBuilder::getTII(), llvm::MachineRegisterInfo::getType(), llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_NE, llvm::CmpInst::ICMP_ULT, llvm::LLT::isVector(), Legalized, llvm::LegalizeActions::Lower, lowerAddSubSatToAddoSubo(), lowerAddSubSatToMinMax(), lowerBitcast(), lowerBitCount(), lowerBitreverse(), lowerBswap(), lowerDIVREM(), lowerDynStackAlloc(), lowerExtract(), lowerExtractInsertVectorElt(), lowerFCopySign(), lowerFFloor(), lowerFMad(), lowerFMinNumMaxNum(), lowerFPOWI(), lowerFPTOSI(), lowerFPTOUI(), lowerFPTRUNC(), lowerFunnelShift(), lowerInsert(), lowerIntrinsicRound(), lowerLoad(), lowerMergeValues(), lowerMinMax(), lowerReadWriteRegister(), lowerRotate(), lowerSADDO_SSUBO(), lowerSelect(), lowerShlSat(), lowerShuffleVector(), lowerSITOFP(), lowerSMULH_UMULH(), lowerStore(), lowerUITOFP(), lowerUnmergeValues(), MI, MIRBuilder, MRI, Observer, llvm::MachineIRBuilder::setInsertPt(), Shift, TII, and UnableToLegalize.

Referenced by legalizeInstrStep().

◆ lowerAddSubSatToAddoSubo()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerAddSubSatToAddoSubo ( MachineInstr MI)

◆ lowerAddSubSatToMinMax()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerAddSubSatToMinMax ( MachineInstr MI)

◆ lowerBitcast()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerBitcast ( MachineInstr MI)

◆ lowerBitCount()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerBitCount ( MachineInstr MI)

◆ lowerBitreverse()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerBitreverse ( MachineInstr MI)

◆ lowerBswap()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerBswap ( MachineInstr MI)

◆ lowerDIVREM()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerDIVREM ( MachineInstr MI)

Definition at line 6824 of file LegalizerHelper.cpp.

References llvm::MachineIRBuilder::buildInstr(), getReg(), Legalized, MI, and MIRBuilder.

Referenced by lower().

◆ lowerDynStackAlloc()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerDynStackAlloc ( MachineInstr MI)

◆ lowerExtract()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerExtract ( MachineInstr MI)

◆ lowerExtractInsertVectorElt()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerExtractInsertVectorElt ( MachineInstr MI)

Lower a vector extract or insert by writing the vector to a stack temporary and reloading the element or vector.

dst = G_EXTRACT_VECTOR_ELT vec, idx => stack_temp = G_FRAME_INDEX G_STORE vec, stack_temp idx = clamp(idx, vec.getNumElements()) element_ptr = G_PTR_ADD stack_temp, idx dst = G_LOAD element_ptr

Definition at line 6214 of file LegalizerHelper.cpp.

References llvm::MachineIRBuilder::buildLoad(), llvm::MachineIRBuilder::buildStore(), llvm::commonAlignment(), createStackTemporary(), llvm::dbgs(), llvm::TypeSize::Fixed(), llvm::LLT::getAddressSpace(), llvm::LLT::getElementType(), llvm::LLT::getSizeInBytes(), getStackTemporaryAlignment(), llvm::MachineRegisterInfo::getType(), getVectorElementPointer(), llvm::MachinePointerInfo::getWithOffset(), llvm::LLT::isByteSized(), Legalized, LLVM_DEBUG, llvm::MIPatternMatch::m_ICst(), MI, llvm::MIPatternMatch::mi_match(), MIRBuilder, Offset, and UnableToLegalize.

Referenced by fewerElementsVectorExtractInsertVectorElt(), and lower().

◆ lowerFCopySign()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerFCopySign ( MachineInstr MI)

◆ lowerFFloor()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerFFloor ( MachineInstr MI)

◆ lowerFMad()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerFMad ( MachineInstr MI)

◆ lowerFMinNumMaxNum()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerFMinNumMaxNum ( MachineInstr MI)

◆ lowerFPOWI()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerFPOWI ( MachineInstr MI)

◆ lowerFPTOSI()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerFPTOSI ( MachineInstr MI)

◆ lowerFPTOUI()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerFPTOUI ( MachineInstr MI)

◆ lowerFPTRUNC()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerFPTRUNC ( MachineInstr MI)

◆ lowerFPTRUNC_F64_TO_F16()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerFPTRUNC_F64_TO_F16 ( MachineInstr MI)

◆ lowerFunnelShift()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerFunnelShift ( MachineInstr MI)

Definition at line 5486 of file LegalizerHelper.cpp.

References llvm::LegalizerInfo::getAction(), llvm::MachineRegisterInfo::getType(), and MI.

Referenced by lower().

◆ lowerFunnelShiftAsShifts()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerFunnelShiftAsShifts ( MachineInstr MI)

◆ lowerFunnelShiftWithInverse()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerFunnelShiftWithInverse ( MachineInstr MI)

◆ lowerInsert()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerInsert ( MachineInstr MI)

◆ lowerIntrinsicRound()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerIntrinsicRound ( MachineInstr MI)

◆ lowerLoad()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerLoad ( MachineInstr MI)

◆ lowerMergeValues()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerMergeValues ( MachineInstr MI)

◆ lowerMinMax()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerMinMax ( MachineInstr MI)

◆ lowerReadWriteRegister()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerReadWriteRegister ( MachineInstr MI)

◆ lowerRotate()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerRotate ( MachineInstr MI)

◆ lowerRotateWithReverseRotate()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerRotateWithReverseRotate ( MachineInstr MI)

◆ lowerSADDO_SSUBO()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerSADDO_SSUBO ( MachineInstr MI)

◆ lowerSelect()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerSelect ( MachineInstr MI)

◆ lowerShlSat()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerShlSat ( MachineInstr MI)

◆ lowerShuffleVector()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerShuffleVector ( MachineInstr MI)

◆ lowerSITOFP()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerSITOFP ( MachineInstr MI)

◆ lowerSMULH_UMULH()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerSMULH_UMULH ( MachineInstr MI)

◆ lowerStore()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerStore ( MachineInstr MI)

◆ lowerU64ToF32BitOps()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerU64ToF32BitOps ( MachineInstr MI)

◆ lowerUITOFP()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerUITOFP ( MachineInstr MI)

◆ lowerUnmergeValues()

LegalizerHelper::LegalizeResult LegalizerHelper::lowerUnmergeValues ( MachineInstr MI)

◆ moreElementsVector()

LegalizerHelper::LegalizeResult LegalizerHelper::moreElementsVector ( MachineInstr MI,
unsigned  TypeIdx,
LLT  MoreTy 
)

◆ moreElementsVectorDst()

void LegalizerHelper::moreElementsVectorDst ( MachineInstr MI,
LLT  MoreTy,
unsigned  OpIdx 
)

Legalize a single operand OpIdx of the machine instruction MI as a Def by performing it with additional vector elements and extracting the result elements, and replacing the vreg of the operand in place.

Definition at line 1286 of file LegalizerHelper.cpp.

References llvm::MachineIRBuilder::getInsertPt(), llvm::MachineIRBuilder::getMBB(), llvm::MachineOperand::getReg(), MI, MIRBuilder, llvm::MachineIRBuilder::setInsertPt(), llvm::MachineOperand::setReg(), and widenWithUnmerge().

Referenced by llvm::AMDGPULegalizerInfo::legalizeSBufferLoad(), moreElementsVector(), and moreElementsVectorPhi().

◆ moreElementsVectorPhi()

LegalizerHelper::LegalizeResult LegalizerHelper::moreElementsVectorPhi ( MachineInstr MI,
unsigned  TypeIdx,
LLT  MoreTy 
)

◆ moreElementsVectorSrc()

void LegalizerHelper::moreElementsVectorSrc ( MachineInstr MI,
LLT  MoreTy,
unsigned  OpIdx 
)

Legalize a single operand OpIdx of the machine instruction MI as a Use by producing a vector with undefined high elements, extracting the original vector type, and replacing the vreg of the operand in place.

Definition at line 1293 of file LegalizerHelper.cpp.

References llvm::MachineIRBuilder::buildConcatVectors(), llvm::MachineIRBuilder::buildInsert(), llvm::MachineIRBuilder::buildUndef(), Concat, llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::LLT::getNumElements(), llvm::MachineInstrBuilder::getReg(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getType(), I, MI, MIRBuilder, and llvm::MachineOperand::setReg().

Referenced by moreElementsVector(), and moreElementsVectorPhi().

◆ narrowScalar()

LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalar ( MachineInstr MI,
unsigned  TypeIdx,
LLT  NarrowTy 
)

Legalize an instruction by reducing the width of the underlying scalar type.

Definition at line 780 of file LegalizerHelper.cpp.

References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addUse(), assert(), llvm::MachineIRBuilder::buildAnyExt(), llvm::MachineIRBuilder::buildAShr(), llvm::MachineIRBuilder::buildBuildVector(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildCopy(), llvm::MachineIRBuilder::buildICmp(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildLoad(), llvm::MachineIRBuilder::buildLoadInstr(), llvm::MachineIRBuilder::buildMerge(), llvm::MachineIRBuilder::buildOr(), llvm::MachineIRBuilder::buildSelect(), llvm::MachineIRBuilder::buildSExt(), llvm::MachineIRBuilder::buildStore(), llvm::MachineIRBuilder::buildTrunc(), llvm::MachineIRBuilder::buildUndef(), llvm::MachineIRBuilder::buildUnmerge(), llvm::MachineIRBuilder::buildXor(), llvm::MachineIRBuilder::buildZExt(), llvm::GISelChangeObserver::changedInstr(), llvm::GISelChangeObserver::changingInstr(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::dbgs(), llvm::MachineBasicBlock::getFirstNonPHI(), llvm::MachineBasicBlock::getFirstTerminator(), llvm::MachineIRBuilder::getInsertPt(), llvm::MachineIRBuilder::getMBB(), llvm::LLT::getNumElements(), llvm::MachineInstrBuilder::getReg(), getReg(), llvm::LLT::getScalarSizeInBits(), llvm::LLT::getSizeInBits(), llvm::MachineRegisterInfo::getType(), llvm::ICmpInst::getUnsignedPredicate(), i, I, llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_NE, llvm::LLT::isVector(), j(), Legalized, LLVM_DEBUG, llvm::APInt::lshr(), MBB, MI, MIRBuilder, narrowScalarAddSub(), narrowScalarBasic(), narrowScalarCTLZ(), narrowScalarCTPOP(), narrowScalarCTTZ(), narrowScalarDst(), narrowScalarExt(), narrowScalarExtract(), narrowScalarFPTOI(), narrowScalarInsert(), narrowScalarMul(), narrowScalarSelect(), narrowScalarShift(), narrowScalarSrc(), Observer, Offset, llvm::Or, reduceLoadStoreWidth(), reduceOperationWidth(), llvm::LLT::scalar(), llvm::MachineIRBuilder::setInsertPt(), llvm::MachineOperand::setReg(), llvm::APInt::trunc(), UnableToLegalize, and llvm::LLT::vector().

Referenced by llvm::MipsRegisterBankInfo::applyMappingImpl(), llvm::AMDGPURegisterBankInfo::applyMappingImpl(), llvm::AMDGPURegisterBankInfo::applyMappingLoad(), and legalizeInstrStep().

◆ narrowScalarAddSub()

LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarAddSub ( MachineInstr MI,
unsigned  TypeIdx,
LLT  NarrowTy 
)

◆ narrowScalarBasic()

LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarBasic ( MachineInstr MI,
unsigned  TypeIdx,
LLT  Ty 
)

◆ narrowScalarCTLZ()

LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarCTLZ ( MachineInstr MI,
unsigned  TypeIdx,
LLT  Ty 
)

◆ narrowScalarCTPOP()

LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarCTPOP ( MachineInstr MI,
unsigned  TypeIdx,
LLT  Ty 
)

◆ narrowScalarCTTZ()

LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarCTTZ ( MachineInstr MI,
unsigned  TypeIdx,
LLT  Ty 
)

◆ narrowScalarDst()

void LegalizerHelper::narrowScalarDst ( MachineInstr MI,
LLT  NarrowTy,
unsigned  OpIdx,
unsigned  ExtOpcode 
)

◆ narrowScalarExt()

LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarExt ( MachineInstr MI,
unsigned  TypeIdx,
LLT  Ty 
)

◆ narrowScalarExtract()

LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarExtract ( MachineInstr MI,
unsigned  TypeIdx,
LLT  Ty 
)

◆ narrowScalarFPTOI()

LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarFPTOI ( MachineInstr MI,
unsigned  TypeIdx,
LLT  Ty 
)

◆ narrowScalarInsert()

LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarInsert ( MachineInstr MI,
unsigned  TypeIdx,
LLT  Ty 
)

◆ narrowScalarMul()

LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarMul ( MachineInstr MI,
LLT  Ty 
)

◆ narrowScalarSelect()

LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarSelect ( MachineInstr MI,
unsigned  TypeIdx,
LLT  Ty 
)

◆ narrowScalarShift()

LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarShift ( MachineInstr MI,
unsigned  TypeIdx,
LLT  Ty 
)

◆ narrowScalarShiftByConstant()

LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarShiftByConstant ( MachineInstr MI,
const APInt Amt,
LLT  HalfTy,
LLT  ShiftAmtTy 
)

◆ narrowScalarSrc()

void LegalizerHelper::narrowScalarSrc ( MachineInstr MI,
LLT  NarrowTy,
unsigned  OpIdx 
)

Legalize a single operand OpIdx of the machine instruction MI as a Use by truncating the operand's type to NarrowTy using G_TRUNC, and replacing the vreg of the operand in place.

Definition at line 1261 of file LegalizerHelper.cpp.

References llvm::MachineIRBuilder::buildTrunc(), MI, MIRBuilder, and llvm::MachineOperand::setReg().

Referenced by narrowScalar(), and narrowScalarShift().

◆ reduceLoadStoreWidth()

LegalizerHelper::LegalizeResult LegalizerHelper::reduceLoadStoreWidth ( MachineInstr MI,
unsigned  TypeIdx,
LLT  NarrowTy 
)

◆ reduceOperationWidth()

LegalizerHelper::LegalizeResult LegalizerHelper::reduceOperationWidth ( MachineInstr MI,
unsigned  TypeIdx,
LLT  NarrowTy 
)

Legalize an instruction by reducing the operation width, either by narrowing the type of the operation or by reducing the number of elements of a vector.

The used strategy (narrow vs. fewerElements) is decided by NarrowTy. Narrow is used if the scalar type of NarrowTy and DstTy differ, fewerElements is used when the scalar type is the same but the number of elements between NarrowTy and DstTy differ.

Definition at line 3946 of file LegalizerHelper.cpp.

References llvm::SmallVectorImpl< T >::append(), assert(), llvm::MachineIRBuilder::buildBitcast(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildUndef(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::getLCMType(), llvm::LLT::getNumElements(), llvm::MachineInstrBuilder::getReg(), llvm::LLT::getScalarType(), llvm::LLT::getSizeInBits(), llvm::MachineRegisterInfo::getType(), I, llvm::LLT::isVector(), Legalized, MI, MIRBuilder, llvm::LLT::scalar(), and llvm::LLT::scalarOrVector().

Referenced by fewerElementsVector(), and narrowScalar().

◆ widenScalar()

LegalizerHelper::LegalizeResult LegalizerHelper::widenScalar ( MachineInstr MI,
unsigned  TypeIdx,
LLT  WideTy 
)

Legalize an instruction by performing the operation on a wider scalar type (for example a 16-bit addition can be safely performed at 32-bits precision, ignoring the unused bits).

Definition at line 1886 of file LegalizerHelper.cpp.

References assert(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildLShr(), llvm::MachineIRBuilder::buildOr(), llvm::MachineIRBuilder::buildSub(), llvm::MachineIRBuilder::buildTrunc(), llvm::MachineIRBuilder::buildZExt(), llvm::MachineIRBuilder::buildZExtOrTrunc(), llvm::GISelChangeObserver::changedInstr(), llvm::GISelChangeObserver::changingInstr(), llvm::APFloat::convert(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), E, llvm::MCInstrInfo::get(), llvm::ConstantInt::get(), llvm::ConstantFP::get(), llvm::MachineIRBuilder::getBoolExtOp(), llvm::MachineOperand::getCImm(), llvm::Function::getContext(), llvm::LLT::getElementType(), llvm::LegalizerInfo::getExtOpcodeForWideningConstant(), llvm::MachineBasicBlock::getFirstNonPHI(), llvm::MachineBasicBlock::getFirstTerminator(), llvm::MachineOperand::getFPImm(), llvm::MachineFunction::getFunction(), llvm::MachineIRBuilder::getInsertPt(), llvm::MachineIRBuilder::getMBB(), llvm::MachineIRBuilder::getMF(), llvm::LLT::getNumElements(), llvm::APInt::getOneBitSet(), llvm::LLT::getScalarSizeInBits(), llvm::LLT::getSizeInBits(), llvm::MachineIRBuilder::getTII(), llvm::MachineRegisterInfo::getType(), llvm::ConstantInt::getValue(), llvm::ConstantFP::getValueAPF(), I, llvm::APFloatBase::IEEEdouble(), llvm::APFloatBase::IEEEsingle(), llvm::LLT::isScalar(), llvm::CmpInst::isSigned(), llvm::LLT::isVector(), Legalized, MBB, MI, MIRBuilder, Observer, llvm::APFloatBase::rmNearestTiesToEven, llvm::MachineOperand::setCImm(), llvm::MachineOperand::setFPImm(), llvm::MachineIRBuilder::setInsertPt(), llvm::APInt::sext(), Shift, UnableToLegalize, llvm::LLT::vector(), widenScalarDst(), widenScalarSrc(), and llvm::APInt::zext().

Referenced by llvm::AMDGPURegisterBankInfo::applyMappingImpl(), and legalizeInstrStep().

◆ widenScalarDst()

void LegalizerHelper::widenScalarDst ( MachineInstr MI,
LLT  WideTy,
unsigned  OpIdx = 0,
unsigned  TruncOpcode = TargetOpcode::G_TRUNC 
)

Legalize a single operand OpIdx of the machine instruction MI as a Def by extending the operand's type to WideTy and truncating it back with the TruncOpcode, and replacing the vreg of the operand in place.

Definition at line 1268 of file LegalizerHelper.cpp.

References llvm::MachineIRBuilder::buildInstr(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::MachineIRBuilder::getInsertPt(), llvm::MachineIRBuilder::getMBB(), MI, MIRBuilder, llvm::MachineIRBuilder::setInsertPt(), and llvm::MachineOperand::setReg().

Referenced by llvm::AMDGPULegalizerInfo::legalizeSBufferLoad(), and widenScalar().

◆ widenScalarSrc()

void LegalizerHelper::widenScalarSrc ( MachineInstr MI,
LLT  WideTy,
unsigned  OpIdx,
unsigned  ExtOpcode 
)

Legalize a single operand OpIdx of the machine instruction MI as a Use by extending the operand's type to WideTy using the specified ExtOpcode for the extension instruction, and replacing the vreg of the operand in place.

Definition at line 1254 of file LegalizerHelper.cpp.

References llvm::MachineIRBuilder::buildInstr(), MI, MIRBuilder, and llvm::MachineOperand::setReg().

Referenced by widenScalar().

◆ widenWithUnmerge()

Register LegalizerHelper::widenWithUnmerge ( LLT  WideTy,
Register  OrigReg 
)

Member Data Documentation

◆ MIRBuilder

MachineIRBuilder& llvm::LegalizerHelper::MIRBuilder

Expose MIRBuilder so clients can set their own RecordInsertInstruction functions.

Definition at line 41 of file LegalizerHelper.h.

Referenced by bitcastDst(), bitcastExtractVectorElt(), bitcastInsertVectorElt(), bitcastSrc(), coerceToScalar(), createStackTemporary(), fewerElementsVectorCasts(), fewerElementsVectorCmp(), fewerElementsVectorExtractInsertVectorElt(), fewerElementsVectorImplicitDef(), fewerElementsVectorMulo(), fewerElementsVectorMultiEltType(), fewerElementsVectorPhi(), fewerElementsVectorReductions(), fewerElementsVectorSelect(), fewerElementsVectorSextInReg(), fewerElementsVectorUnmergeValues(), getVectorElementPointer(), llvm::MipsLegalizerInfo::legalizeCustom(), llvm::ARMLegalizerInfo::legalizeCustom(), llvm::AArch64LegalizerInfo::legalizeCustom(), llvm::AMDGPULegalizerInfo::legalizeCustom(), legalizeInstrStep(), llvm::MipsLegalizerInfo::legalizeIntrinsic(), llvm::AMDGPULegalizerInfo::legalizeIntrinsic(), llvm::AMDGPULegalizerInfo::legalizeLoad(), llvm::Legalizer::legalizeMachineFunction(), llvm::AMDGPULegalizerInfo::legalizeMinNumMaxNum(), llvm::AMDGPULegalizerInfo::legalizeSBufferLoad(), libcall(), lower(), lowerAddSubSatToAddoSubo(), lowerAddSubSatToMinMax(), lowerBitcast(), lowerBitCount(), lowerBitreverse(), lowerBswap(), lowerDIVREM(), lowerDynStackAlloc(), lowerExtract(), lowerExtractInsertVectorElt(), lowerFCopySign(), lowerFFloor(), lowerFMad(), lowerFMinNumMaxNum(), lowerFPOWI(), lowerFPTOSI(), lowerFPTOUI(), lowerFPTRUNC_F64_TO_F16(), lowerFunnelShiftAsShifts(), lowerFunnelShiftWithInverse(), lowerInsert(), lowerIntrinsicRound(), lowerLoad(), lowerMergeValues(), lowerMinMax(), lowerReadWriteRegister(), lowerRotate(), lowerRotateWithReverseRotate(), lowerSADDO_SSUBO(), lowerSelect(), lowerShlSat(), lowerShuffleVector(), lowerSITOFP(), lowerSMULH_UMULH(), lowerStore(), lowerU64ToF32BitOps(), lowerUITOFP(), lowerUnmergeValues(), moreElementsVector(), moreElementsVectorDst(), moreElementsVectorPhi(), moreElementsVectorSrc(), narrowScalar(), narrowScalarAddSub(), narrowScalarBasic(), narrowScalarCTLZ(), narrowScalarCTPOP(), narrowScalarCTTZ(), narrowScalarDst(), narrowScalarExtract(), narrowScalarInsert(), narrowScalarMul(), narrowScalarSelect(), narrowScalarShift(), narrowScalarShiftByConstant(), narrowScalarSrc(), reduceLoadStoreWidth(), reduceOperationWidth(), widenScalar(), widenScalarDst(), widenScalarSrc(), and widenWithUnmerge().

◆ Observer

GISelChangeObserver& llvm::LegalizerHelper::Observer

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