LLVM 20.0.0git
|
#include "llvm/CodeGen/GlobalISel/LegalizerHelper.h"
Public Types | |
enum | LegalizeResult { AlreadyLegal , Legalized , UnableToLegalize } |
Public Attributes | |
MachineIRBuilder & | MIRBuilder |
Expose MIRBuilder so clients can set their own RecordInsertInstruction functions. | |
GISelChangeObserver & | Observer |
To keep track of changes made by the LegalizerHelper. | |
Definition at line 47 of file LegalizerHelper.h.
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 63 of file LegalizerHelper.h.
LegalizerHelper::LegalizerHelper | ( | MachineFunction & | MF, |
GISelChangeObserver & | Observer, | ||
MachineIRBuilder & | B | ||
) |
Definition at line 104 of file LegalizerHelper.cpp.
LegalizerHelper::LegalizerHelper | ( | MachineFunction & | MF, |
const LegalizerInfo & | LI, | ||
GISelChangeObserver & | Observer, | ||
MachineIRBuilder & | B, | ||
GISelKnownBits * | KB = nullptr |
||
) |
Definition at line 111 of file LegalizerHelper.cpp.
LegalizerHelper::LegalizeResult LegalizerHelper::bitcast | ( | MachineInstr & | MI, |
unsigned | TypeIdx, | ||
LLT | Ty | ||
) |
Legalize an instruction by replacing the value type.
Definition at line 3857 of file LegalizerHelper.cpp.
References bitcastConcatVector(), bitcastDst(), bitcastExtractVectorElt(), bitcastInsertVectorElt(), bitcastSrc(), llvm::GISelChangeObserver::changedInstr(), llvm::GISelChangeObserver::changingInstr(), llvm::MachineMemOperand::clearRanges(), llvm::dbgs(), llvm::MachineMemOperand::getMemoryType(), llvm::LLT::getSizeInBits(), llvm::MachineRegisterInfo::getType(), llvm::LLT::isVector(), Legalized, LLVM_DEBUG, MI, Observer, llvm::MachineMemOperand::setType(), and UnableToLegalize.
Referenced by legalizeInstrStep().
LegalizerHelper::LegalizeResult LegalizerHelper::bitcastConcatVector | ( | MachineInstr & | MI, |
unsigned | TypeIdx, | ||
LLT | CastTy | ||
) |
Definition at line 3586 of file LegalizerHelper.cpp.
References llvm::LLT::getSizeInBits(), llvm::LegalizerInfo::isLegal(), MI, llvm::LLT::scalar(), and UnableToLegalize.
Referenced by bitcast().
void LegalizerHelper::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
.
Definition at line 1986 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildBitcast(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::MachineIRBuilder::getInsertPt(), llvm::MachineIRBuilder::getMBB(), MI, MIRBuilder, llvm::MachineIRBuilder::setInsertPt(), and llvm::MachineOperand::setReg().
Referenced by bitcast(), and llvm::AMDGPULegalizerInfo::legalizeSBufferLoad().
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 3377 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::ElementCount::getFixed(), llvm::LLT::getNumElements(), llvm::MachineInstrBuilder::getReg(), llvm::LLT::getSizeInBits(), I, Idx, llvm::isPowerOf2_32(), llvm::LLT::isVector(), Legalized, llvm::Log2_32(), MI, MIRBuilder, llvm::LLT::scalarOrVector(), and UnableToLegalize.
Referenced by bitcast().
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 3513 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(), Idx, llvm::isPowerOf2_32(), llvm::LLT::isVector(), Legalized, llvm::Log2_32(), MI, MIRBuilder, and UnableToLegalize.
Referenced by bitcast().
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 1981 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildBitcast(), llvm::MachineInstrBuilder::getReg(), MI, and MIRBuilder.
Referenced by bitcast().
Cast the given value to an LLT::scalar with an equivalent size.
Returns the register to use if an instruction was inserted. Returns the original register if no coercion was necessary.
Definition at line 1911 of file LegalizerHelper.cpp.
References assert(), llvm::MachineIRBuilder::buildBitcast(), llvm::MachineIRBuilder::buildPtrToInt(), DL, llvm::LLT::getAddressSpace(), llvm::MachineIRBuilder::getDataLayout(), llvm::MachineInstrBuilder::getReg(), llvm::LLT::getSizeInBits(), llvm::MachineRegisterInfo::getType(), llvm::LLT::isPointer(), llvm::LLT::isPointerVector(), llvm::LLT::isScalar(), llvm::LLT::isVector(), MIRBuilder, and llvm::LLT::scalar().
Referenced by lowerUnmergeValues().
MachineInstrBuilder LegalizerHelper::createStackTemporary | ( | TypeSize | Bytes, |
Align | Alignment, | ||
MachinePointerInfo & | PtrInfo | ||
) |
Create a stack temporary based on the size in bytes and the alignment.
Definition at line 4301 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildFrameIndex(), llvm::MachineFrameInfo::CreateStackObject(), DL, llvm::MachineIRBuilder::getDataLayout(), llvm::MachinePointerInfo::getFixedStack(), llvm::MachineFunction::getFrameInfo(), llvm::MachineIRBuilder::getMF(), MIRBuilder, and llvm::LLT::pointer().
Referenced by lowerExtractInsertVectorElt(), and lowerVECTOR_COMPRESS().
LegalizerHelper::LegalizeResult LegalizerHelper::equalizeVectorShuffleLengths | ( | MachineInstr & | MI | ) |
Equalize source and destination vector sizes of G_SHUFFLE_VECTOR.
Definition at line 5870 of file LegalizerHelper.cpp.
References llvm::alignTo(), llvm::MachineIRBuilder::buildBuildVector(), llvm::MachineIRBuilder::buildConcatVectors(), llvm::MachineIRBuilder::buildExtractVectorElementConstant(), llvm::MachineIRBuilder::buildShuffleVector(), llvm::MachineIRBuilder::buildUndef(), llvm::LLT::fixed_vector(), llvm::LLT::getElementType(), llvm::LLT::getNumElements(), llvm::MachineInstrBuilder::getReg(), I, Idx, Legalized, MI, MIRBuilder, moreElementsVectorDst(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::MachineIRBuilder::setInstrAndDebugLoc().
Referenced by moreElementsVectorShuffle().
LegalizerHelper::LegalizeResult LegalizerHelper::fewerElementsBitcast | ( | MachineInstr & | MI, |
unsigned | TypeIdx, | ||
LLT | NarrowTy | ||
) |
Definition at line 5050 of file LegalizerHelper.cpp.
References assert(), llvm::MachineIRBuilder::buildBitcast(), llvm::MachineIRBuilder::buildMergeLikeInstr(), llvm::LLT::fixed_vector(), llvm::MachineInstrBuilder::getReg(), llvm::LLT::getScalarSizeInBits(), llvm::LLT::getSizeInBits(), Legalized, MI, MIRBuilder, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SmallVectorBase< Size_T >::size(), and UnableToLegalize.
Referenced by fewerElementsVector().
LegalizerHelper::LegalizeResult LegalizerHelper::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.
Definition at line 4880 of file LegalizerHelper.cpp.
References assert(), fewerElementsBitcast(), fewerElementsVectorExtractInsertVectorElt(), fewerElementsVectorMerge(), fewerElementsVectorMultiEltType(), fewerElementsVectorPhi(), fewerElementsVectorReductions(), fewerElementsVectorSeqReductions(), fewerElementsVectorShuffle(), fewerElementsVectorUnmergeValues(), llvm::LLT::getNumElements(), llvm::MachineRegisterInfo::getType(), GISEL_VECREDUCE_CASES_NONSEQ, llvm::LLT::isVector(), MI, reduceLoadStoreWidth(), and UnableToLegalize.
Referenced by llvm::AMDGPURegisterBankInfo::applyMappingLoad(), and legalizeInstrStep().
LegalizerHelper::LegalizeResult LegalizerHelper::fewerElementsVectorExtractInsertVectorElt | ( | MachineInstr & | MI, |
unsigned | TypeIdx, | ||
LLT | NarrowTy | ||
) |
Definition at line 4711 of file LegalizerHelper.cpp.
References assert(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildExtractVectorElement(), llvm::MachineIRBuilder::buildInsertVectorElement(), llvm::MachineIRBuilder::buildUndef(), llvm::getIConstantVRegValWithLookThrough(), llvm::LLT::getNumElements(), llvm::MachineRegisterInfo::getType(), Idx, llvm::LLT::isVector(), Legalized, lowerExtractInsertVectorElt(), MI, MIRBuilder, and UnableToLegalize.
Referenced by fewerElementsVector().
LegalizerHelper::LegalizeResult LegalizerHelper::fewerElementsVectorMerge | ( | MachineInstr & | MI, |
unsigned | TypeIdx, | ||
LLT | NarrowTy | ||
) |
Definition at line 4625 of file LegalizerHelper.cpp.
References assert(), llvm::MachineIRBuilder::buildMergeLikeInstr(), llvm::MachineIRBuilder::buildUnmerge(), llvm::LLT::getNumElements(), llvm::MachineInstrBuilder::getReg(), llvm::LLT::getScalarType(), llvm::LLT::getSizeInBits(), llvm::MachineRegisterInfo::getType(), llvm::LLT::isVector(), Legalized, MI, MIRBuilder, llvm::Offset, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and UnableToLegalize.
Referenced by fewerElementsVector().
LegalizerHelper::LegalizeResult LegalizerHelper::fewerElementsVectorMultiEltType | ( | GenericMachineInstr & | MI, |
unsigned | NumElts, | ||
std::initializer_list< unsigned > | NonVecOpIndices = {} |
||
) |
Handles most opcodes.
Split MI
into same instruction on sub-vectors or scalars with NumElts
elements (1 for scalar). Supports uneven splits: there can be leftover sub-vector with fewer then NumElts
or a leftover scalar. To avoid this use moreElements first and set MI number of elements to multiple of NumElts
. Non-vector operands that should be used on all sub-instructions without split are listed in NonVecOpIndices
.
Definition at line 4452 of file LegalizerHelper.cpp.
References assert(), broadcastSrcOp(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildMergeLikeInstr(), llvm::extractVectorParts(), llvm::LLT::getNumElements(), llvm::MachineRegisterInfo::getType(), hasSameNumEltsOnAllVectorOperands(), I, llvm::is_contained(), Legalized, makeDstOps(), MI, MIRBuilder, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::size(), and Uses.
Referenced by fewerElementsVector().
LegalizerHelper::LegalizeResult LegalizerHelper::fewerElementsVectorPhi | ( | GenericMachineInstr & | MI, |
unsigned | NumElts | ||
) |
Definition at line 4523 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildMergeLikeInstr(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::extractVectorParts(), llvm::MachineBasicBlock::getFirstNonPHI(), llvm::MachineBasicBlock::getFirstTerminatorForward(), llvm::LLT::getNumElements(), llvm::MachineRegisterInfo::getType(), Legalized, makeDstOps(), MBB, MI, MIRBuilder, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::MachineIRBuilder::setInsertPt().
Referenced by fewerElementsVector().
LegalizerHelper::LegalizeResult LegalizerHelper::fewerElementsVectorReductions | ( | MachineInstr & | MI, |
unsigned | TypeIdx, | ||
LLT | NarrowTy | ||
) |
Definition at line 5218 of file LegalizerHelper.cpp.
References assert(), llvm::MachineIRBuilder::buildCopy(), llvm::MachineIRBuilder::buildInstr(), llvm::SmallVectorImpl< T >::clear(), llvm::SmallVectorImpl< T >::emplace_back(), llvm::extractParts(), llvm::LLT::getNumElements(), getReg(), llvm::MachineInstrBuilder::getReg(), Idx, llvm::isPowerOf2_32(), llvm::LLT::isScalar(), llvm::LLT::isVector(), Legalized, MI, MIRBuilder, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SmallVectorBase< Size_T >::size(), and UnableToLegalize.
Referenced by fewerElementsVector().
LegalizerHelper::LegalizeResult LegalizerHelper::fewerElementsVectorSeqReductions | ( | MachineInstr & | MI, |
unsigned | TypeIdx, | ||
LLT | NarrowTy | ||
) |
Definition at line 5305 of file LegalizerHelper.cpp.
References assert(), llvm::MachineIRBuilder::buildCopy(), llvm::MachineIRBuilder::buildInstr(), llvm::extractParts(), llvm::LLT::getNumElements(), llvm::MachineInstrBuilder::getReg(), llvm::LLT::isScalar(), Legalized, MI, MIRBuilder, and UnableToLegalize.
Referenced by fewerElementsVector().
LegalizerHelper::LegalizeResult LegalizerHelper::fewerElementsVectorShuffle | ( | MachineInstr & | MI, |
unsigned | TypeIdx, | ||
LLT | NarrowTy | ||
) |
Definition at line 5080 of file LegalizerHelper.cpp.
References assert(), llvm::MachineIRBuilder::buildBuildVector(), llvm::MachineIRBuilder::buildConcatVectors(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildShuffleVector(), llvm::MachineIRBuilder::buildUndef(), llvm::LLT::changeElementCount(), llvm::SmallVectorImpl< T >::clear(), llvm::extractParts(), llvm::LLT::getElementType(), llvm::LLT::getNumElements(), getReg(), llvm::MachineInstrBuilder::getReg(), llvm::Hi, High, Idx, llvm::isPowerOf2_32(), Legalized, llvm::Lo, MI, MIRBuilder, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::LLT::scalar(), and UnableToLegalize.
Referenced by fewerElementsVector().
LegalizerHelper::LegalizeResult LegalizerHelper::fewerElementsVectorUnmergeValues | ( | MachineInstr & | MI, |
unsigned | TypeIdx, | ||
LLT | NarrowTy | ||
) |
Definition at line 4576 of file LegalizerHelper.cpp.
References llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addUse(), assert(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildUnmerge(), llvm::MachineInstr::getNumOperands(), llvm::LLT::getScalarType(), llvm::LLT::getSizeInBits(), llvm::MachineRegisterInfo::getType(), I, llvm::LLT::isVector(), Legalized, MI, MIRBuilder, and UnableToLegalize.
Referenced by fewerElementsVector().
Register LegalizerHelper::getDynStackAllocTargetPtr | ( | Register | SPReg, |
Register | AllocSize, | ||
Align | Alignment, | ||
LLT | PtrTy | ||
) |
Definition at line 7899 of file LegalizerHelper.cpp.
References llvm::Alloc, llvm::MachineIRBuilder::buildAnd(), llvm::MachineIRBuilder::buildCast(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildCopy(), llvm::MachineIRBuilder::buildSub(), llvm::MachineInstrBuilder::getReg(), llvm::LLT::getSizeInBits(), MIRBuilder, llvm::APInt::negate(), llvm::LLT::scalar(), and llvm::Align::value().
Referenced by lowerDynStackAlloc().
|
inline |
Definition at line 79 of file LegalizerHelper.h.
Referenced by llvm::AMDGPULegalizerInfo::buildMultiply().
|
inline |
Expose LegalizerInfo so the clients can re-use.
Definition at line 77 of file LegalizerHelper.h.
Return the alignment to use for a stack temporary object with the given type.
Definition at line 4290 of file LegalizerHelper.cpp.
References llvm::LLT::getSizeInBytes(), llvm::MinAlign(), and llvm::PowerOf2Ceil().
Referenced by lowerExtractInsertVectorElt(), and lowerVECTOR_COMPRESS().
|
inline |
Definition at line 78 of file LegalizerHelper.h.
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 4335 of file LegalizerHelper.cpp.
References assert(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildMul(), llvm::MachineIRBuilder::buildPtrAdd(), llvm::MachineIRBuilder::buildSExtOrTrunc(), llvm::LLT::changeElementSize(), clampVectorIndex(), DL, llvm::LLT::getAddressSpace(), llvm::MachineIRBuilder::getDataLayout(), llvm::LLT::getElementType(), llvm::MachineInstrBuilder::getReg(), llvm::LLT::getSizeInBits(), llvm::MachineRegisterInfo::getType(), MIRBuilder, and llvm::Mul.
Referenced by lowerExtractInsertVectorElt(), lowerVECTOR_COMPRESS(), and llvm::CombinerHelper::matchCombineExtractedVectorLoad().
LegalizerHelper::LegalizeResult LegalizerHelper::legalizeInstrStep | ( | MachineInstr & | MI, |
LostDebugLocObserver & | LocObserver | ||
) |
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 118 of file LegalizerHelper.cpp.
References AlreadyLegal, bitcast(), llvm::LegalizeActions::Bitcast, llvm::LegalizeActions::Custom, llvm::dbgs(), llvm::LegalizeActions::FewerElements, fewerElementsVector(), llvm::LegalizerInfo::getAction(), llvm::IRSimilarity::Legal, llvm::LegalizerInfo::legalizeCustom(), Legalized, llvm::LegalizerInfo::legalizeIntrinsic(), llvm::LegalizeActions::Libcall, libcall, LLVM_DEBUG, lower(), llvm::Lower, MI, MIRBuilder, llvm::LegalizeActions::MoreElements, moreElementsVector(), narrowScalar(), llvm::LegalizeActions::NarrowScalar, llvm::MachineIRBuilder::setInstrAndDebugLoc(), UnableToLegalize, widenScalar(), and llvm::LegalizeActions::WidenScalar.
Referenced by llvm::Legalizer::legalizeMachineFunction().
LegalizerHelper::LegalizeResult LegalizerHelper::libcall | ( | MachineInstr & | MI, |
LostDebugLocObserver & | LocObserver | ||
) |
Legalize an instruction by emiting a runtime library call instead.
Definition at line 1168 of file LegalizerHelper.cpp.
References conversionLibcall(), createAtomicLibcall(), llvm::createLibcall(), llvm::createMemLibcall(), llvm::dbgs(), llvm::IntegerType::get(), llvm::Function::getContext(), getFloatTypeForLLT(), llvm::MachineFunction::getFunction(), llvm::Type::getIntNTy(), llvm::MachineIRBuilder::getMF(), llvm::MachineIRBuilder::getMRI(), getReg(), getRTLibDesc(), llvm::LLT::getSizeInBits(), llvm::MachineRegisterInfo::getType(), Legalized, llvm::LegalizeActions::Libcall, LLVM_DEBUG, MI, MIRBuilder, simpleLibcall(), Size, and UnableToLegalize.
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 3939 of file LegalizerHelper.cpp.
References Addr, assert(), llvm::MachineIRBuilder::buildAdd(), llvm::MachineIRBuilder::buildAnd(), llvm::MachineIRBuilder::buildAShr(), llvm::MachineIRBuilder::buildAtomicCmpXchg(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildCopy(), llvm::MachineIRBuilder::buildFAdd(), llvm::MachineIRBuilder::buildFNeg(), llvm::MachineIRBuilder::buildFPTOSI(), llvm::MachineIRBuilder::buildICmp(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildMul(), llvm::MachineIRBuilder::buildOr(), llvm::MachineIRBuilder::buildShl(), llvm::MachineIRBuilder::buildStrictFAdd(), llvm::MachineIRBuilder::buildSub(), llvm::MachineIRBuilder::buildXor(), llvm::MachineIRBuilder::buildZExt(), llvm::GISelChangeObserver::changedInstr(), llvm::GISelChangeObserver::changingInstr(), llvm::MachineRegisterInfo::cloneVirtualRegister(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::MachineIRBuilder::getInsertPt(), llvm::MachineIRBuilder::getMBB(), llvm::LLT::getScalarSizeInBits(), llvm::APInt::getSignMask(), llvm::LLT::getSizeInBits(), llvm::MachineIRBuilder::getTII(), llvm::MachineRegisterInfo::getType(), GISEL_VECREDUCE_CASES_NONSEQ, llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_NE, llvm::CmpInst::ICMP_UGT, llvm::CmpInst::ICMP_ULT, llvm::LegalizerInfo::isLegalOrCustom(), llvm::LLT::isVector(), Legalized, LHS, lowerAbsToAddXor(), lowerAddSubSatToAddoSubo(), lowerAddSubSatToMinMax(), lowerBitcast(), lowerBitCount(), lowerBitreverse(), lowerBswap(), lowerDIVREM(), lowerDynStackAlloc(), lowerEXT(), lowerExtract(), lowerExtractInsertVectorElt(), lowerFConstant(), lowerFCopySign(), lowerFFloor(), lowerFMad(), lowerFMinNumMaxNum(), lowerFPOWI(), lowerFPTOSI(), lowerFPTOUI(), lowerFPTRUNC(), lowerFunnelShift(), lowerInsert(), lowerIntrinsicRound(), lowerISFPCLASS(), lowerLoad(), lowerMemCpyFamily(), lowerMergeValues(), lowerMinMax(), lowerReadWriteRegister(), lowerRotate(), lowerSADDO_SSUBO(), lowerSelect(), lowerShlSat(), lowerShuffleVector(), lowerSITOFP(), lowerSMULH_UMULH(), lowerStackRestore(), lowerStackSave(), lowerStore(), lowerThreewayCompare(), lowerTRUNC(), lowerUITOFP(), lowerUnmergeValues(), lowerVAArg(), lowerVECTOR_COMPRESS(), lowerVectorReduction(), MI, MIRBuilder, Observer, RHS, llvm::MachineIRBuilder::setInsertPt(), TII, and UnableToLegalize.
Referenced by llvm::RISCVLegalizerInfo::legalizeCustom(), and legalizeInstrStep().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerAbsToAddXor | ( | MachineInstr & | MI | ) |
Definition at line 8718 of file LegalizerHelper.cpp.
References llvm::Add, llvm::MachineIRBuilder::buildAdd(), llvm::MachineIRBuilder::buildAShr(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildXor(), llvm::LLT::getScalarSizeInBits(), llvm::MachineRegisterInfo::getType(), Legalized, MI, and MIRBuilder.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerAbsToCNeg | ( | MachineInstr & | MI | ) |
Definition at line 8750 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildICmp(), llvm::MachineIRBuilder::buildSelect(), llvm::MachineIRBuilder::buildSub(), llvm::MachineInstrBuilder::getReg(), llvm::MachineRegisterInfo::getType(), llvm::CmpInst::ICMP_SGT, Legalized, MI, MIRBuilder, and llvm::LLT::scalar().
Referenced by llvm::AArch64LegalizerInfo::legalizeCustom().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerAbsToMaxNeg | ( | MachineInstr & | MI | ) |
Definition at line 8735 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildSMax(), llvm::MachineIRBuilder::buildSub(), llvm::MachineRegisterInfo::getType(), Legalized, MI, and MIRBuilder.
Referenced by llvm::AMDGPURegisterBankInfo::applyMappingImpl(), and llvm::RISCVLegalizerInfo::legalizeCustom().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerAddSubSatToAddoSubo | ( | MachineInstr & | MI | ) |
Definition at line 8226 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildAdd(), llvm::MachineIRBuilder::buildAShr(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildSelect(), llvm::LLT::changeElementSize(), llvm::LLT::getScalarSizeInBits(), llvm::APInt::getSignedMinValue(), llvm::MachineRegisterInfo::getType(), Legalized, LHS, llvm_unreachable, MI, MIRBuilder, and RHS.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerAddSubSatToMinMax | ( | MachineInstr & | MI | ) |
Definition at line 8151 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildNot(), llvm::MachineIRBuilder::buildSMax(), llvm::MachineIRBuilder::buildSMin(), llvm::MachineIRBuilder::buildSub(), llvm::MachineIRBuilder::buildUMin(), llvm::MachineInstrBuilder::getReg(), llvm::LLT::getScalarSizeInBits(), llvm::APInt::getSignedMaxValue(), llvm::APInt::getSignedMinValue(), llvm::MachineRegisterInfo::getType(), llvm::Hi, Legalized, LHS, llvm_unreachable, llvm::Lo, MI, MIRBuilder, and RHS.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerBitcast | ( | MachineInstr & | MI | ) |
Definition at line 3285 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildBitcast(), llvm::MachineIRBuilder::buildMergeLikeInstr(), llvm::LLT::fixed_vector(), llvm::LLT::getElementType(), llvm::LLT::getNumElements(), llvm::MachineInstrBuilder::getReg(), getUnmergePieces(), llvm::LLT::isVector(), Legalized, MI, MIRBuilder, and UnableToLegalize.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerBitCount | ( | MachineInstr & | MI | ) |
Definition at line 6573 of file LegalizerHelper.cpp.
References llvm::LegalizeActionStep::Action, assert(), B, llvm::MachineIRBuilder::buildAdd(), llvm::MachineIRBuilder::buildAnd(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildCTLZ(), llvm::MachineIRBuilder::buildCTLZ_ZERO_UNDEF(), llvm::MachineIRBuilder::buildCTPOP(), llvm::MachineIRBuilder::buildCTTZ_ZERO_UNDEF(), llvm::MachineIRBuilder::buildICmp(), llvm::MachineIRBuilder::buildLShr(), llvm::MachineIRBuilder::buildOr(), llvm::MachineIRBuilder::buildSelect(), llvm::MachineIRBuilder::buildSub(), llvm::MachineIRBuilder::buildXor(), llvm::GISelChangeObserver::changedInstr(), llvm::LLT::changeElementSize(), llvm::GISelChangeObserver::changingInstr(), llvm::LegalizeActions::Custom, llvm::LegalizerInfo::getAction(), llvm::LLT::getSizeInBits(), llvm::APInt::getSplat(), llvm::MachineIRBuilder::getTII(), llvm::MachineRegisterInfo::getType(), llvm::CmpInst::ICMP_EQ, llvm::IRSimilarity::Legal, Legalized, llvm::LegalizeActions::Libcall, MI, MIRBuilder, Observer, llvm::PowerOf2Ceil(), Size, TII, UnableToLegalize, and llvm::LegalizeActions::WidenScalar.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerBitreverse | ( | MachineInstr & | MI | ) |
Definition at line 8368 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildAnd(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildCopy(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildLShr(), llvm::MachineIRBuilder::buildOr(), llvm::MachineIRBuilder::buildShl(), llvm::LLT::getScalarSizeInBits(), llvm::APInt::getSplat(), llvm::MachineRegisterInfo::getType(), I, Legalized, MI, MIRBuilder, Size, and SwapN().
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerBswap | ( | MachineInstr & | MI | ) |
Definition at line 8323 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildAnd(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildLShr(), llvm::MachineIRBuilder::buildOr(), llvm::MachineIRBuilder::buildShl(), llvm::LLT::getScalarSizeInBits(), llvm::MachineRegisterInfo::getType(), Legalized, MI, and MIRBuilder.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerConstant | ( | MachineInstr & | MI | ) |
Definition at line 3263 of file LegalizerHelper.cpp.
References emitLoadFromConstantPool(), llvm::MachineOperand::getCImm(), Legalized, MI, and MIRBuilder.
Referenced by llvm::RISCVLegalizerInfo::legalizeCustom().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerDIVREM | ( | MachineInstr & | MI | ) |
Definition at line 8701 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildInstr(), getReg(), Legalized, MI, and MIRBuilder.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerDynStackAlloc | ( | MachineInstr & | MI | ) |
Definition at line 7923 of file LegalizerHelper.cpp.
References llvm::assumeAligned(), llvm::MachineIRBuilder::buildCopy(), getDynStackAllocTargetPtr(), llvm::TargetLoweringBase::getStackPointerRegisterToSaveRestore(), llvm::MachineRegisterInfo::getType(), Legalized, MI, MIRBuilder, llvm::TargetFrameLowering::StackGrowsUp, and UnableToLegalize.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerEXT | ( | MachineInstr & | MI | ) |
Definition at line 6876 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildMergeLikeInstr(), llvm::MachineIRBuilder::buildUnmerge(), llvm::LLT::changeElementCount(), llvm::LLT::changeElementSize(), llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::divideCoefficientBy(), llvm::LLT::getElementCount(), llvm::LLT::getScalarSizeInBits(), llvm::LLT::getSizeInBits(), llvm::MachineRegisterInfo::getType(), llvm::isPowerOf2_32(), Legalized, MI, MIRBuilder, and UnableToLegalize.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerExtract | ( | MachineInstr & | MI | ) |
Definition at line 7968 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildBitcast(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildCopy(), llvm::MachineIRBuilder::buildLShr(), llvm::MachineIRBuilder::buildMergeLikeInstr(), llvm::MachineIRBuilder::buildTrunc(), llvm::MachineIRBuilder::buildUnmerge(), llvm::LLT::getElementType(), llvm::MachineInstrBuilder::getReg(), llvm::LLT::getSizeInBits(), Idx, llvm::LLT::isScalar(), llvm::LLT::isVector(), Legalized, MI, MIRBuilder, llvm::Offset, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::LLT::scalar(), llvm::SmallVectorBase< Size_T >::size(), and UnableToLegalize.
Referenced by lower().
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 7702 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildCopy(), llvm::MachineIRBuilder::buildLoad(), llvm::MachineIRBuilder::buildMergeLikeInstr(), llvm::MachineIRBuilder::buildStore(), llvm::commonAlignment(), createStackTemporary(), llvm::dbgs(), llvm::extractParts(), llvm::LLT::getAddressSpace(), llvm::LLT::getElementType(), llvm::TypeSize::getFixed(), llvm::LLT::getNumElements(), llvm::LLT::getSizeInBytes(), getStackTemporaryAlignment(), llvm::MachineRegisterInfo::getType(), getVectorElementPointer(), llvm::MachinePointerInfo::getWithOffset(), Idx, llvm::LLT::isByteSized(), Legalized, LLVM_DEBUG, llvm::MIPatternMatch::m_ICst(), MI, llvm::MIPatternMatch::mi_match(), MIRBuilder, llvm::Offset, and UnableToLegalize.
Referenced by fewerElementsVectorExtractInsertVectorElt(), and lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerFConstant | ( | MachineInstr & | MI | ) |
Definition at line 3274 of file LegalizerHelper.cpp.
References emitLoadFromConstantPool(), llvm::MachineOperand::getFPImm(), Legalized, MI, and MIRBuilder.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerFCopySign | ( | MachineInstr & | MI | ) |
Definition at line 7481 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildAnd(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildLShr(), llvm::MachineIRBuilder::buildOr(), llvm::MachineIRBuilder::buildShl(), llvm::MachineIRBuilder::buildTrunc(), llvm::MachineIRBuilder::buildZExt(), llvm::MachineInstr::Disjoint, llvm::APInt::getLowBitsSet(), llvm::MachineInstrBuilder::getReg(), llvm::APInt::getSignMask(), Legalized, MI, and MIRBuilder.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerFFloor | ( | MachineInstr & | MI | ) |
Definition at line 7598 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildAnd(), llvm::MachineIRBuilder::buildFAdd(), llvm::MachineIRBuilder::buildFCmp(), llvm::MachineIRBuilder::buildFConstant(), llvm::MachineIRBuilder::buildIntrinsicTrunc(), llvm::MachineIRBuilder::buildSITOFP(), llvm::LLT::changeElementSize(), llvm::CmpInst::FCMP_OLT, llvm::CmpInst::FCMP_ONE, llvm::MachineRegisterInfo::getType(), Legalized, MI, and MIRBuilder.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerFMad | ( | MachineInstr & | MI | ) |
Definition at line 7551 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildFAdd(), llvm::MachineIRBuilder::buildFMul(), llvm::MachineRegisterInfo::getType(), Legalized, MI, MIRBuilder, and llvm::Mul.
Referenced by llvm::AMDGPULegalizerInfo::legalizeFMad(), and lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerFMinNumMaxNum | ( | MachineInstr & | MI | ) |
Definition at line 7523 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildFCanonicalize(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineInstr::FmNoNans, llvm::MachineInstrBuilder::getReg(), llvm::MachineRegisterInfo::getType(), llvm::isKnownNeverSNaN(), Legalized, MI, and MIRBuilder.
Referenced by llvm::AMDGPULegalizerInfo::legalizeMinNumMaxNum(), and lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerFPOWI | ( | MachineInstr & | MI | ) |
Definition at line 7412 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildFPow(), llvm::MachineIRBuilder::buildSITOFP(), llvm::MachineRegisterInfo::getType(), Legalized, MI, and MIRBuilder.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerFPTOSI | ( | MachineInstr & | MI | ) |
Definition at line 7220 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildAnd(), llvm::MachineIRBuilder::buildAShr(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildICmp(), llvm::MachineIRBuilder::buildLShr(), llvm::MachineIRBuilder::buildOr(), llvm::MachineIRBuilder::buildSelect(), llvm::MachineIRBuilder::buildSExt(), llvm::MachineIRBuilder::buildShl(), llvm::MachineIRBuilder::buildSub(), llvm::MachineIRBuilder::buildXor(), llvm::MachineIRBuilder::buildZExt(), llvm::Exponent, llvm::LLT::getScalarSizeInBits(), llvm::LLT::getScalarType(), llvm::APInt::getSignMask(), llvm::CmpInst::ICMP_SGT, llvm::CmpInst::ICMP_SLT, Legalized, MI, MIRBuilder, S1, S32, S64, llvm::LLT::scalar(), and UnableToLegalize.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerFPTOUI | ( | MachineInstr & | MI | ) |
Definition at line 7180 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildFCmp(), llvm::MachineIRBuilder::buildFConstant(), llvm::MachineIRBuilder::buildFPTOSI(), llvm::MachineIRBuilder::buildFSub(), llvm::MachineIRBuilder::buildSelect(), llvm::MachineIRBuilder::buildXor(), llvm::APFloat::convertFromAPInt(), llvm::CmpInst::FCMP_ULT, llvm::APInt::getSignMask(), llvm::LLT::getSizeInBits(), llvm::APInt::getZero(), llvm::APFloatBase::IEEEdouble(), llvm::APFloatBase::IEEEsingle(), Legalized, MI, MIRBuilder, llvm::APFloatBase::rmNearestTiesToEven, S1, S32, S64, llvm::LLT::scalar(), and UnableToLegalize.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerFPTRUNC | ( | MachineInstr & | MI | ) |
Definition at line 7401 of file LegalizerHelper.cpp.
References llvm::LLT::getScalarType(), lowerFPTRUNC_F64_TO_F16(), MI, S16, S64, llvm::LLT::scalar(), and UnableToLegalize.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerFPTRUNC_F64_TO_F16 | ( | MachineInstr & | MI | ) |
Definition at line 7286 of file LegalizerHelper.cpp.
References assert(), B, llvm::MachineIRBuilder::buildAdd(), llvm::MachineIRBuilder::buildAnd(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildFPTrunc(), llvm::MachineIRBuilder::buildICmp(), llvm::MachineIRBuilder::buildLShr(), llvm::MachineIRBuilder::buildOr(), llvm::MachineIRBuilder::buildSelect(), llvm::MachineIRBuilder::buildShl(), llvm::MachineIRBuilder::buildSMax(), llvm::MachineIRBuilder::buildSMin(), llvm::MachineIRBuilder::buildSub(), llvm::MachineIRBuilder::buildTrunc(), llvm::MachineIRBuilder::buildUnmerge(), llvm::MachineIRBuilder::buildZExt(), D, llvm::MachineIRBuilder::getMF(), llvm::LLT::getScalarType(), llvm::MachineFunction::getTarget(), llvm::MachineRegisterInfo::getType(), I, llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_NE, llvm::CmpInst::ICMP_SGT, llvm::CmpInst::ICMP_SLT, llvm::LLT::isVector(), Legalized, MI, MIRBuilder, N, llvm::TargetMachine::Options, S1, S32, llvm::LLT::scalar(), UnableToLegalize, and llvm::TargetOptions::UnsafeFPMath.
Referenced by lowerFPTRUNC().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerFunnelShift | ( | MachineInstr & | MI | ) |
Definition at line 6853 of file LegalizerHelper.cpp.
References llvm::LegalizerInfo::getAction(), llvm::MachineRegisterInfo::getType(), and MI.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerFunnelShiftAsShifts | ( | MachineInstr & | MI | ) |
Definition at line 6798 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildAnd(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildLShr(), llvm::MachineIRBuilder::buildNot(), llvm::MachineIRBuilder::buildOr(), llvm::MachineIRBuilder::buildShl(), llvm::MachineIRBuilder::buildSub(), llvm::MachineIRBuilder::buildURem(), llvm::MachineInstrBuilder::getReg(), llvm::LLT::getScalarSizeInBits(), llvm::MachineRegisterInfo::getType(), isNonZeroModBitWidthOrUndef(), llvm::isPowerOf2_32(), Legalized, MI, MIRBuilder, X, and Y.
LegalizerHelper::LegalizeResult LegalizerHelper::lowerFunnelShiftWithInverse | ( | MachineInstr & | MI | ) |
Definition at line 6759 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildLShr(), llvm::MachineIRBuilder::buildNot(), llvm::MachineIRBuilder::buildShl(), llvm::MachineIRBuilder::buildSub(), getReg(), llvm::MachineInstrBuilder::getReg(), llvm::LLT::getScalarSizeInBits(), llvm::MachineRegisterInfo::getType(), isNonZeroModBitWidthOrUndef(), llvm::isPowerOf2_32(), Legalized, MI, MIRBuilder, UnableToLegalize, X, and Y.
LegalizerHelper::LegalizeResult LegalizerHelper::lowerInsert | ( | MachineInstr & | MI | ) |
Definition at line 8022 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildAnd(), llvm::MachineIRBuilder::buildCast(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildMergeLikeInstr(), llvm::MachineIRBuilder::buildOr(), llvm::MachineIRBuilder::buildPtrToInt(), llvm::MachineIRBuilder::buildShl(), llvm::MachineIRBuilder::buildUnmerge(), llvm::MachineIRBuilder::buildZExt(), llvm::dbgs(), DL, llvm::LLT::getAddressSpace(), llvm::APInt::getBitsSetWithWrap(), llvm::MachineIRBuilder::getDataLayout(), llvm::LLT::getElementType(), llvm::LLT::getNumElements(), llvm::MachineInstrBuilder::getReg(), llvm::LLT::getSizeInBits(), llvm::MachineRegisterInfo::getType(), Idx, llvm::LLT::isPointer(), llvm::LLT::isScalar(), llvm::LLT::isVector(), Legalized, LLVM_DEBUG, MI, MIRBuilder, llvm::Offset, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::LLT::scalar(), and UnableToLegalize.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerIntrinsicRound | ( | MachineInstr & | MI | ) |
Definition at line 7565 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildFAbs(), llvm::MachineIRBuilder::buildFAdd(), llvm::MachineIRBuilder::buildFCmp(), llvm::MachineIRBuilder::buildFConstant(), llvm::MachineIRBuilder::buildFCopysign(), llvm::MachineIRBuilder::buildFSub(), llvm::MachineIRBuilder::buildIntrinsicTrunc(), llvm::MachineIRBuilder::buildSelect(), llvm::LLT::changeElementSize(), llvm::CmpInst::FCMP_OGE, llvm::MachineRegisterInfo::getType(), Legalized, MI, MIRBuilder, and X.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerISFPCLASS | ( | MachineInstr & | MI | ) |
Definition at line 8470 of file LegalizerHelper.cpp.
References llvm::APFloat::bitcastToAPInt(), llvm::MachineIRBuilder::buildAnd(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildCopy(), llvm::MachineIRBuilder::buildICmp(), llvm::MachineIRBuilder::buildOr(), llvm::MachineIRBuilder::buildSub(), llvm::MachineIRBuilder::buildXor(), llvm::fcAllFlags, llvm::fcFinite, llvm::fcInf, llvm::fcNan, llvm::fcNegFinite, llvm::fcNegNormal, llvm::fcNegSubnormal, llvm::fcNone, llvm::fcNormal, llvm::fcPosFinite, llvm::fcPosInf, llvm::fcPosNormal, llvm::fcPosSubnormal, llvm::fcPosZero, llvm::fcQNan, llvm::fcSubnormal, llvm::fcZero, llvm::APInt::getActiveBits(), llvm::APInt::getAllOnes(), llvm::LLT::getElementCount(), llvm::getFltSemanticForLLT(), llvm::APFloat::getInf(), llvm::APFloat::getLargest(), llvm::APInt::getOneBitSet(), llvm::LLT::getScalarSizeInBits(), llvm::LLT::getScalarType(), llvm::APInt::getSignedMaxValue(), llvm::APInt::getSignMask(), llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_NE, llvm::CmpInst::ICMP_UGE, llvm::CmpInst::ICMP_UGT, llvm::CmpInst::ICMP_ULT, llvm::LLT::isVector(), Legalized, MI, MIRBuilder, llvm::LLT::scalar(), llvm::APInt::shl(), and llvm::LLT::vector().
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerLoad | ( | GAnyLoad & | MI | ) |
Definition at line 3620 of file LegalizerHelper.cpp.
References llvm::TargetLoweringBase::allowsMemoryAccess(), assert(), llvm::bit_floor(), llvm::MachineIRBuilder::buildAssertZExt(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildIntToPtr(), llvm::MachineIRBuilder::buildLoad(), llvm::MachineIRBuilder::buildLoadInstr(), llvm::MachineIRBuilder::buildOr(), llvm::MachineIRBuilder::buildPtrAdd(), llvm::MachineIRBuilder::buildSExtInReg(), llvm::MachineIRBuilder::buildShl(), llvm::MachineIRBuilder::buildTrunc(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::MachineInstr::eraseFromParent(), llvm::Function::getContext(), llvm::MachineIRBuilder::getDataLayout(), llvm::GAnyLoad::getDstReg(), llvm::LLT::getElementType(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getMachineMemOperand(), llvm::MachineMemOperand::getMemoryType(), llvm::MachineIRBuilder::getMF(), llvm::GMemOperation::getMMO(), llvm::MachineInstr::getOpcode(), llvm::MachineMemOperand::getPointerInfo(), llvm::GLoadStore::getPointerReg(), llvm::LLT::getSizeInBits(), llvm::LLT::getSizeInBytes(), llvm::MachineRegisterInfo::getType(), llvm::DataLayout::isBigEndian(), llvm::LLT::isPointer(), llvm::isPowerOf2_32(), llvm::LLT::isVector(), Legalized, MIRBuilder, llvm::PowerOf2Ceil(), reduceLoadStoreWidth(), llvm::LLT::scalar(), and UnableToLegalize.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerMemCpyFamily | ( | MachineInstr & | MI, |
unsigned | MaxLen = 0 |
||
) |
Definition at line 9304 of file LegalizerHelper.cpp.
References assert(), llvm::getIConstantVRegValWithLookThrough(), llvm::TargetLoweringBase::getMaxStoresPerMemcpy(), Legalized, MI, shouldLowerMemFuncForSize(), and UnableToLegalize.
Referenced by lower(), and llvm::CombinerHelper::tryCombineMemCpyFamily().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerMemcpyInline | ( | MachineInstr & | MI | ) |
Definition at line 9051 of file LegalizerHelper.cpp.
References assert(), llvm::getIConstantVRegValWithLookThrough(), Legalized, and MI.
LegalizerHelper::LegalizeResult LegalizerHelper::lowerMergeValues | ( | MachineInstr & | MI | ) |
Definition at line 7624 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildIntToPtr(), llvm::MachineIRBuilder::buildOr(), llvm::MachineIRBuilder::buildShl(), llvm::MachineIRBuilder::buildZExt(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::dbgs(), llvm::MachineIRBuilder::getDataLayout(), llvm::MachineInstrBuilder::getReg(), I, llvm::DataLayout::isNonIntegralAddressSpace(), Legalized, LLVM_DEBUG, MI, MIRBuilder, llvm::Offset, llvm::LLT::scalar(), and UnableToLegalize.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerMinMax | ( | MachineInstr & | MI | ) |
Definition at line 7437 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildICmp(), llvm::MachineIRBuilder::buildSelect(), llvm::LLT::changeElementSize(), llvm::MachineRegisterInfo::getType(), Legalized, MI, minMaxToCompare(), and MIRBuilder.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerReadWriteRegister | ( | MachineInstr & | MI | ) |
Definition at line 8422 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildCopy(), llvm::StringRef::data(), llvm::MachineIRBuilder::getMF(), llvm::TargetLowering::getRegisterByName(), llvm::MDString::getString(), llvm::MachineRegisterInfo::getType(), llvm::Register::isValid(), Legalized, MI, MIRBuilder, and UnableToLegalize.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerRotate | ( | MachineInstr & | MI | ) |
Definition at line 6987 of file LegalizerHelper.cpp.
References llvm::LegalizerInfo::isLegalOrCustom(), MI, MIRBuilder, and llvm::MachineIRBuilder::setInstrAndDebugLoc().
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerRotateWithReverseRotate | ( | MachineInstr & | MI | ) |
Definition at line 6976 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildSub(), Legalized, MI, and MIRBuilder.
LegalizerHelper::LegalizeResult LegalizerHelper::lowerSADDO_SSUBO | ( | MachineInstr & | MI | ) |
Definition at line 8112 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildAdd(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildCopy(), llvm::MachineIRBuilder::buildICmp(), llvm::MachineIRBuilder::buildSub(), llvm::MachineIRBuilder::buildXor(), llvm::MachineRegisterInfo::cloneVirtualRegister(), llvm::CmpInst::ICMP_SGT, llvm::CmpInst::ICMP_SLT, Legalized, LHS, MI, MIRBuilder, and RHS.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerSelect | ( | MachineInstr & | MI | ) |
Definition at line 8643 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildAnd(), llvm::MachineIRBuilder::buildIntToPtr(), llvm::MachineIRBuilder::buildNot(), llvm::MachineIRBuilder::buildOr(), llvm::MachineIRBuilder::buildPtrToInt(), llvm::MachineIRBuilder::buildSExtInReg(), llvm::MachineIRBuilder::buildSExtOrTrunc(), llvm::MachineIRBuilder::buildShuffleSplat(), llvm::LLT::changeElementType(), llvm::MachineInstrBuilder::getReg(), Legalized, MI, MIRBuilder, llvm::LLT::scalar(), and UnableToLegalize.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerShlSat | ( | MachineInstr & | MI | ) |
Definition at line 8292 of file LegalizerHelper.cpp.
References assert(), llvm::MachineIRBuilder::buildAShr(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildICmp(), llvm::MachineIRBuilder::buildLShr(), llvm::MachineIRBuilder::buildSelect(), llvm::MachineIRBuilder::buildShl(), llvm::LLT::changeElementSize(), llvm::APInt::getMaxValue(), llvm::LLT::getScalarSizeInBits(), llvm::APInt::getSignedMaxValue(), llvm::APInt::getSignedMinValue(), llvm::MachineRegisterInfo::getType(), llvm::CmpInst::ICMP_NE, llvm::CmpInst::ICMP_SLT, Legalized, LHS, MI, MIRBuilder, and RHS.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerShuffleVector | ( | MachineInstr & | MI | ) |
Definition at line 7774 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildBuildVector(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildCopy(), llvm::MachineIRBuilder::buildExtractVectorElement(), llvm::MachineIRBuilder::buildUndef(), llvm::MachineInstrBuilder::getReg(), llvm::LLT::getScalarType(), Idx, Legalized, MI, MIRBuilder, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::LLT::scalar().
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerSITOFP | ( | MachineInstr & | MI | ) |
Definition at line 7137 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildAdd(), llvm::MachineIRBuilder::buildAShr(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildFConstant(), llvm::MachineIRBuilder::buildFNeg(), llvm::MachineIRBuilder::buildICmp(), llvm::MachineIRBuilder::buildSelect(), llvm::MachineIRBuilder::buildUITOFP(), llvm::MachineIRBuilder::buildXor(), llvm::CmpInst::ICMP_NE, Legalized, MI, MIRBuilder, S1, S32, S64, llvm::LLT::scalar(), UnableToLegalize, and llvm::Xor.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerSMULH_UMULH | ( | MachineInstr & | MI | ) |
Definition at line 8448 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildMul(), llvm::MachineIRBuilder::buildTrunc(), llvm::LLT::changeElementSize(), llvm::LLT::getScalarSizeInBits(), llvm::MachineRegisterInfo::getType(), Legalized, LHS, MI, MIRBuilder, llvm::Mul, and RHS.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerStackRestore | ( | MachineInstr & | MI | ) |
Definition at line 7957 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildCopy(), llvm::TargetLoweringBase::getStackPointerRegisterToSaveRestore(), Legalized, MI, MIRBuilder, and UnableToLegalize.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerStackSave | ( | MachineInstr & | MI | ) |
Definition at line 7946 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildCopy(), llvm::TargetLoweringBase::getStackPointerRegisterToSaveRestore(), Legalized, MI, MIRBuilder, and UnableToLegalize.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerStore | ( | GStore & | MI | ) |
Definition at line 3757 of file LegalizerHelper.cpp.
References llvm::TargetLoweringBase::allowsMemoryAccess(), llvm::MachineIRBuilder::buildAnyExt(), llvm::MachineIRBuilder::buildAnyExtOrTrunc(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildLShr(), llvm::MachineIRBuilder::buildPtrAdd(), llvm::MachineIRBuilder::buildPtrToInt(), llvm::MachineIRBuilder::buildStore(), llvm::MachineIRBuilder::buildZExtInReg(), llvm::MachineInstr::eraseFromParent(), llvm::Function::getContext(), llvm::MachineIRBuilder::getDataLayout(), llvm::LLT::getElementType(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getMachineMemOperand(), llvm::MachineMemOperand::getMemoryType(), llvm::MachineIRBuilder::getMF(), llvm::MachineMemOperand::getPointerInfo(), llvm::GLoadStore::getPointerReg(), llvm::MachineInstrBuilder::getReg(), llvm::LLT::getSizeInBits(), llvm::LLT::getSizeInBytes(), llvm::MachineRegisterInfo::getType(), llvm::GStore::getValueReg(), llvm::LLT::isPointer(), llvm::isPowerOf2_32(), llvm::LLT::isVector(), Legalized, llvm::MachineInstr::memoperands_begin(), MIRBuilder, llvm::PowerOf2Ceil(), reduceLoadStoreWidth(), llvm::LLT::scalar(), and UnableToLegalize.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerThreewayCompare | ( | MachineInstr & | MI | ) |
Definition at line 7451 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildICmp(), llvm::MachineIRBuilder::buildSelect(), llvm::LLT::changeElementSize(), llvm::MachineRegisterInfo::getType(), llvm::CmpInst::ICMP_SGT, llvm::CmpInst::ICMP_SLT, llvm::CmpInst::ICMP_UGT, llvm::CmpInst::ICMP_ULT, Legalized, MI, and MIRBuilder.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerTRUNC | ( | MachineInstr & | MI | ) |
Definition at line 6918 of file LegalizerHelper.cpp.
References assert(), llvm::MachineIRBuilder::buildCopy(), llvm::MachineIRBuilder::buildMergeLikeInstr(), llvm::MachineIRBuilder::buildTrunc(), llvm::LLT::changeElementCount(), llvm::LLT::changeElementSize(), llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::divideCoefficientBy(), llvm::extractParts(), llvm::LLT::getElementCount(), llvm::MachineIRBuilder::getMRI(), llvm::LLT::getNumElements(), llvm::MachineInstrBuilder::getReg(), llvm::LLT::getScalarSizeInBits(), I, llvm::isPowerOf2_32(), llvm::LLT::isVector(), Legalized, Merge, MI, MIRBuilder, MRI, llvm::SmallVectorBase< Size_T >::size(), and UnableToLegalize.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerU64ToF32BitOps | ( | MachineInstr & | MI | ) |
Definition at line 7057 of file LegalizerHelper.cpp.
References assert(), llvm::MachineIRBuilder::buildAdd(), llvm::MachineIRBuilder::buildAnd(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildCTLZ_ZERO_UNDEF(), llvm::MachineIRBuilder::buildICmp(), llvm::MachineIRBuilder::buildLShr(), llvm::MachineIRBuilder::buildOr(), llvm::MachineIRBuilder::buildSelect(), llvm::MachineIRBuilder::buildShl(), llvm::MachineIRBuilder::buildSub(), llvm::MachineIRBuilder::buildTrunc(), llvm::CallingConv::C, llvm::MachineRegisterInfo::getType(), llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_NE, llvm::CmpInst::ICMP_UGT, Legalized, MI, MIRBuilder, S1, S32, S64, and llvm::LLT::scalar().
Referenced by lowerUITOFP().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerUITOFP | ( | MachineInstr & | MI | ) |
Definition at line 7112 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildFConstant(), llvm::MachineIRBuilder::buildSelect(), Legalized, lowerU64ToF32BitOps(), MI, MIRBuilder, llvm::LLT::scalar(), and UnableToLegalize.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerUnmergeValues | ( | MachineInstr & | MI | ) |
Definition at line 7662 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildLShr(), llvm::MachineIRBuilder::buildTrunc(), coerceToScalar(), llvm::LLT::getSizeInBits(), llvm::MachineRegisterInfo::getType(), I, llvm::LLT::isPointer(), Legalized, MI, MIRBuilder, llvm::Offset, and UnableToLegalize.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerVAArg | ( | MachineInstr & | MI | ) |
Definition at line 8781 of file LegalizerHelper.cpp.
References A, llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildLoad(), llvm::MachineIRBuilder::buildMaskLowPtrBits(), llvm::MachineIRBuilder::buildPtrAdd(), llvm::MachineIRBuilder::buildStore(), DL, llvm::Function::getContext(), llvm::MachineIRBuilder::getDataLayout(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getMachineMemOperand(), llvm::TargetLoweringBase::getMinStackArgumentAlignment(), llvm::MachineInstrBuilder::getReg(), llvm::LLT::getSizeInBits(), llvm::MachineRegisterInfo::getType(), llvm::getTypeForLLT(), Legalized, llvm::Log2(), MI, MIRBuilder, llvm::MachineMemOperand::MOLoad, llvm::MachineMemOperand::MOStore, and llvm::LLT::scalar().
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerVECTOR_COMPRESS | ( | llvm::MachineInstr & | MI | ) |
Definition at line 7813 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildAdd(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildExtractVectorElement(), llvm::MachineIRBuilder::buildICmp(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildLoad(), llvm::MachineIRBuilder::buildSelect(), llvm::MachineIRBuilder::buildStore(), llvm::MachineIRBuilder::buildTrunc(), llvm::MachineIRBuilder::buildZExt(), createStackTemporary(), llvm::LLT::getElementType(), llvm::TypeSize::getFixed(), llvm::LLT::getNumElements(), llvm::MachineInstr::getOpcode(), llvm::MachineInstrBuilder::getReg(), llvm::LLT::getSizeInBits(), getStackTemporaryAlignment(), llvm::MachinePointerInfo::getUnknownStack(), getVectorElementPointer(), llvm::MachineRegisterInfo::getVRegDef(), I, llvm::CmpInst::ICMP_UGT, Idx, llvm::isConstantOrConstantSplatVector(), Legalized, MI, MIRBuilder, llvm::report_fatal_error(), and llvm::LLT::scalar().
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::lowerVectorReduction | ( | MachineInstr & | MI | ) |
Definition at line 8763 of file LegalizerHelper.cpp.
References llvm::GISelChangeObserver::changedInstr(), llvm::GISelChangeObserver::changingInstr(), llvm::MCInstrInfo::get(), llvm::LLT::getSizeInBits(), llvm::MachineIRBuilder::getTII(), llvm::MachineRegisterInfo::getType(), llvm::LLT::isScalar(), Legalized, MI, MIRBuilder, Observer, and UnableToLegalize.
Referenced by lower().
LegalizerHelper::LegalizeResult LegalizerHelper::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.
Definition at line 5619 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildDeleteTrailingVectorElements(), llvm::MachineIRBuilder::buildInsertVectorElement(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildPadVectorWithUndefElements(), llvm::MachineIRBuilder::buildShuffleSplat(), llvm::MachineIRBuilder::buildUndef(), llvm::GISelChangeObserver::changedInstr(), llvm::LLT::changeElementCount(), llvm::GISelChangeObserver::changingInstr(), llvm::LLT::fixed_vector(), llvm::ElementCount::get(), llvm::MachineIRBuilder::getDataLayout(), llvm::LLT::getElementCount(), llvm::LLT::getElementType(), llvm::LLT::getNumElements(), llvm::LLT::getScalarType(), llvm::MachineRegisterInfo::getType(), llvm::TargetLoweringBase::getVectorIdxTy(), Idx, llvm::LLT::isScalable(), Legalized, MI, MIRBuilder, moreElementsVectorDst(), moreElementsVectorPhi(), moreElementsVectorShuffle(), moreElementsVectorSrc(), Observer, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::MachineOperand::setReg(), llvm::SmallVectorBase< Size_T >::size(), and UnableToLegalize.
Referenced by legalizeInstrStep().
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 1964 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildDeleteTrailingVectorElements(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::MachineIRBuilder::getInsertPt(), llvm::MachineIRBuilder::getMBB(), llvm::MachineOperand::getReg(), MI, MIRBuilder, llvm::MachineIRBuilder::setInsertPt(), and llvm::MachineOperand::setReg().
Referenced by equalizeVectorShuffleLengths(), llvm::AMDGPULegalizerInfo::legalizeSBufferLoad(), moreElementsVector(), moreElementsVectorPhi(), and moreElementsVectorShuffle().
LegalizerHelper::LegalizeResult LegalizerHelper::moreElementsVectorPhi | ( | MachineInstr & | MI, |
unsigned | TypeIdx, | ||
LLT | MoreTy | ||
) |
Definition at line 5563 of file LegalizerHelper.cpp.
References assert(), llvm::GISelChangeObserver::changedInstr(), llvm::GISelChangeObserver::changingInstr(), llvm::MachineBasicBlock::getFirstNonPHI(), llvm::MachineBasicBlock::getFirstTerminator(), I, Legalized, MBB, MI, MIRBuilder, moreElementsVectorDst(), moreElementsVectorSrc(), Observer, and llvm::MachineIRBuilder::setInsertPt().
Referenced by moreElementsVector().
LegalizerHelper::LegalizeResult LegalizerHelper::moreElementsVectorShuffle | ( | MachineInstr & | MI, |
unsigned | TypeIdx, | ||
LLT | MoreTy | ||
) |
Definition at line 5942 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildShuffleVector(), equalizeVectorShuffleLengths(), llvm::LLT::getNumElements(), I, Idx, Legalized, MI, MIRBuilder, moreElementsVectorDst(), moreElementsVectorSrc(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::MachineIRBuilder::setInstrAndDebugLoc(), and UnableToLegalize.
Referenced by moreElementsVector().
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 1974 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildPadVectorWithUndefElements(), llvm::MachineInstrBuilder::getReg(), MI, MIRBuilder, and llvm::MachineOperand::setReg().
Referenced by moreElementsVector(), moreElementsVectorPhi(), and moreElementsVectorShuffle().
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 1370 of file LegalizerHelper.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addUse(), assert(), llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), 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::buildMergeLikeInstr(), llvm::MachineIRBuilder::buildMul(), llvm::MachineIRBuilder::buildOr(), llvm::MachineIRBuilder::buildSelect(), llvm::MachineIRBuilder::buildSExt(), llvm::MachineIRBuilder::buildStore(), llvm::MachineIRBuilder::buildTrunc(), llvm::MachineIRBuilder::buildUndef(), llvm::MachineIRBuilder::buildUnmerge(), llvm::MachineIRBuilder::buildVScale(), llvm::MachineIRBuilder::buildXor(), llvm::MachineIRBuilder::buildZExt(), llvm::CallingConv::C, llvm::GISelChangeObserver::changedInstr(), llvm::GISelChangeObserver::changingInstr(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::dbgs(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::extractParts(), llvm::LLT::getElementCount(), llvm::MachineBasicBlock::getFirstNonPHI(), llvm::MachineBasicBlock::getFirstTerminatorForward(), llvm::MachineIRBuilder::getInsertPt(), llvm::MachineIRBuilder::getMBB(), getReg(), llvm::MachineInstrBuilder::getReg(), llvm::LLT::getScalarSizeInBits(), llvm::MachineMemOperand::getSizeInBits(), llvm::LLT::getSizeInBits(), llvm::MachineRegisterInfo::getType(), llvm::ICmpInst::getUnsignedPredicate(), llvm::LocationSize::getValue(), I, llvm::CmpInst::ICMP_EQ, llvm::SmallVectorImpl< T >::insert(), llvm::ICmpInst::isEquality(), llvm::LLT::isVector(), Legalized, LHS, LLVM_DEBUG, llvm::APInt::lshr(), MBB, MI, MIRBuilder, narrowScalarAddSub(), narrowScalarBasic(), narrowScalarCTLZ(), narrowScalarCTPOP(), narrowScalarCTTZ(), narrowScalarDst(), narrowScalarExt(), narrowScalarExtract(), narrowScalarFLDEXP(), narrowScalarFPTOI(), narrowScalarInsert(), narrowScalarMul(), narrowScalarSelect(), narrowScalarShift(), narrowScalarSrc(), Observer, llvm::Offset, llvm::SmallVectorTemplateBase< T, bool >::push_back(), reduceLoadStoreWidth(), RHS, llvm::LLT::scalar(), llvm::MachineIRBuilder::setInsertPt(), llvm::MachineOperand::setReg(), llvm::SmallVectorBase< Size_T >::size(), llvm::APInt::trunc(), UnableToLegalize, llvm::LLT::vector(), llvm::Xor, and llvm::zip().
Referenced by llvm::AMDGPURegisterBankInfo::applyMappingImpl(), llvm::MipsRegisterBankInfo::applyMappingImpl(), llvm::AMDGPURegisterBankInfo::applyMappingLoad(), and legalizeInstrStep().
LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarAddSub | ( | MachineInstr & | MI, |
unsigned | TypeIdx, | ||
LLT | NarrowTy | ||
) |
Definition at line 6048 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildInstr(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::extractParts(), llvm::MachineRegisterInfo::getType(), I, llvm::LLT::isVector(), Legalized, llvm_unreachable, MI, MIRBuilder, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SmallVectorImpl< T >::reserve(), llvm::LLT::scalar(), llvm::SmallVectorBase< Size_T >::size(), and UnableToLegalize.
Referenced by narrowScalar().
LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarBasic | ( | MachineInstr & | MI, |
unsigned | TypeIdx, | ||
LLT | Ty | ||
) |
Definition at line 6351 of file LegalizerHelper.cpp.
References assert(), llvm::MachineIRBuilder::buildInstr(), llvm::extractParts(), llvm::MachineRegisterInfo::getType(), I, Legalized, llvm_unreachable, MI, MIRBuilder, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SmallVectorBase< Size_T >::size(), and UnableToLegalize.
Referenced by narrowScalar().
LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarCTLZ | ( | MachineInstr & | MI, |
unsigned | TypeIdx, | ||
LLT | Ty | ||
) |
Definition at line 6459 of file LegalizerHelper.cpp.
References B, llvm::LLT::getSizeInBits(), llvm::CmpInst::ICMP_EQ, llvm::LLT::isScalar(), Legalized, MI, MIRBuilder, llvm::LLT::scalar(), and UnableToLegalize.
Referenced by narrowScalar().
LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarCTPOP | ( | MachineInstr & | MI, |
unsigned | TypeIdx, | ||
LLT | Ty | ||
) |
Definition at line 6525 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildAdd(), llvm::MachineIRBuilder::buildCTPOP(), llvm::MachineIRBuilder::buildUnmerge(), llvm::LLT::getSizeInBits(), llvm::LLT::isScalar(), Legalized, MI, MIRBuilder, and UnableToLegalize.
Referenced by narrowScalar().
LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarCTTZ | ( | MachineInstr & | MI, |
unsigned | TypeIdx, | ||
LLT | Ty | ||
) |
Definition at line 6492 of file LegalizerHelper.cpp.
References B, llvm::LLT::getSizeInBits(), llvm::CmpInst::ICMP_EQ, llvm::LLT::isScalar(), Legalized, MI, MIRBuilder, llvm::LLT::scalar(), and UnableToLegalize.
Referenced by narrowScalar().
void LegalizerHelper::narrowScalarDst | ( | MachineInstr & | MI, |
LLT | NarrowTy, | ||
unsigned | OpIdx, | ||
unsigned | ExtOpcode | ||
) |
Definition at line 1955 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 narrowScalar(), and narrowScalarFPTOI().
LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarExt | ( | MachineInstr & | MI, |
unsigned | TypeIdx, | ||
LLT | Ty | ||
) |
Definition at line 6392 of file LegalizerHelper.cpp.
References llvm::MachineRegisterInfo::getType(), llvm::LLT::isVector(), Legalized, MI, and UnableToLegalize.
Referenced by narrowScalar().
LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarExtract | ( | MachineInstr & | MI, |
unsigned | TypeIdx, | ||
LLT | Ty | ||
) |
Definition at line 6199 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildBuildVector(), llvm::MachineIRBuilder::buildCopy(), llvm::MachineIRBuilder::buildExtract(), llvm::MachineIRBuilder::buildMergeLikeInstr(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::extractParts(), llvm::LLT::getSizeInBits(), llvm::MachineRegisterInfo::getType(), llvm::LLT::isVector(), Legalized, MI, MIRBuilder, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::LLT::scalar(), llvm::SmallVectorBase< Size_T >::size(), and UnableToLegalize.
Referenced by narrowScalar().
LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarFLDEXP | ( | MachineInstr & | MI, |
unsigned | TypeIdx, | ||
LLT | Ty | ||
) |
Definition at line 6548 of file LegalizerHelper.cpp.
References B, llvm::GISelChangeObserver::changedInstr(), llvm::GISelChangeObserver::changingInstr(), llvm::LLT::getScalarSizeInBits(), llvm::MachineRegisterInfo::getType(), Legalized, llvm::maxIntN(), MI, llvm::minIntN(), MIRBuilder, Observer, and UnableToLegalize.
Referenced by narrowScalar().
LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarFPTOI | ( | MachineInstr & | MI, |
unsigned | TypeIdx, | ||
LLT | Ty | ||
) |
Definition at line 6174 of file LegalizerHelper.cpp.
References llvm::GISelChangeObserver::changedInstr(), llvm::GISelChangeObserver::changingInstr(), llvm::LLT::getScalarSizeInBits(), llvm::LLT::getScalarType(), llvm::MachineRegisterInfo::getType(), Legalized, MI, narrowScalarDst(), Observer, llvm::LLT::scalar(), and UnableToLegalize.
Referenced by narrowScalar().
LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarInsert | ( | MachineInstr & | MI, |
unsigned | TypeIdx, | ||
LLT | Ty | ||
) |
Definition at line 6267 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildAnyExt(), llvm::MachineIRBuilder::buildExtract(), llvm::MachineIRBuilder::buildInsert(), llvm::MachineIRBuilder::buildMergeLikeInstr(), llvm::MachineIRBuilder::buildTrunc(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::extractParts(), llvm::LLT::getSizeInBits(), llvm::MachineRegisterInfo::getType(), I, Legalized, MI, MIRBuilder, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::LLT::scalar(), llvm::SmallVectorBase< Size_T >::size(), and UnableToLegalize.
Referenced by narrowScalar().
LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarMul | ( | MachineInstr & | MI, |
LLT | Ty | ||
) |
Definition at line 6144 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildMergeLikeInstr(), llvm::extractParts(), llvm::LLT::getSizeInBits(), llvm::MachineRegisterInfo::getType(), llvm::LLT::isVector(), Legalized, MI, MIRBuilder, Size, and UnableToLegalize.
Referenced by narrowScalar().
LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarSelect | ( | MachineInstr & | MI, |
unsigned | TypeIdx, | ||
LLT | Ty | ||
) |
Definition at line 6413 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildSelect(), llvm::extractParts(), llvm::MachineRegisterInfo::getType(), I, llvm::LLT::isVector(), Legalized, llvm_unreachable, MI, MIRBuilder, llvm::SmallVectorTemplateBase< T, bool >::push_back(), Select, llvm::SmallVectorBase< Size_T >::size(), and UnableToLegalize.
Referenced by narrowScalar().
LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarShift | ( | MachineInstr & | MI, |
unsigned | TypeIdx, | ||
LLT | Ty | ||
) |
Definition at line 5454 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildAShr(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildICmp(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildLShr(), llvm::MachineIRBuilder::buildMergeLikeInstr(), llvm::MachineIRBuilder::buildOr(), llvm::MachineIRBuilder::buildSelect(), llvm::MachineIRBuilder::buildShl(), llvm::MachineIRBuilder::buildSub(), llvm::MachineIRBuilder::buildUnmerge(), llvm::GISelChangeObserver::changedInstr(), llvm::GISelChangeObserver::changingInstr(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::getIConstantVRegValWithLookThrough(), llvm::LLT::getScalarSizeInBits(), llvm::MachineRegisterInfo::getType(), llvm::Hi, llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_ULT, llvm::LLT::isVector(), Legalized, llvm_unreachable, llvm::Lo, MI, MIRBuilder, narrowScalarShiftByConstant(), narrowScalarSrc(), Observer, llvm::LLT::scalar(), and UnableToLegalize.
Referenced by narrowScalar().
LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalarShiftByConstant | ( | MachineInstr & | MI, |
const APInt & | Amt, | ||
LLT | HalfTy, | ||
LLT | ShiftAmtTy | ||
) |
Definition at line 5365 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildAShr(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildLShr(), llvm::MachineIRBuilder::buildMergeLikeInstr(), llvm::MachineIRBuilder::buildOr(), llvm::MachineIRBuilder::buildShl(), llvm::MachineIRBuilder::buildUnmerge(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::LLT::getSizeInBits(), llvm::Hi, llvm::APInt::isZero(), Legalized, llvm::Lo, MI, MIRBuilder, and llvm::APInt::ugt().
Referenced by narrowScalarShift().
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 1939 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildTrunc(), MI, MIRBuilder, and llvm::MachineOperand::setReg().
Referenced by narrowScalar(), and narrowScalarShift().
LegalizerHelper::LegalizeResult LegalizerHelper::reduceLoadStoreWidth | ( | GLoadStore & | MI, |
unsigned | TypeIdx, | ||
LLT | NarrowTy | ||
) |
Definition at line 4785 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildLoad(), llvm::MachineIRBuilder::buildStore(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::dbgs(), llvm::MachineInstr::eraseFromParent(), llvm::extractParts(), llvm::MachineIRBuilder::getDataLayout(), llvm::MachineFunction::getMachineMemOperand(), llvm::GMemOperation::getMemSize(), llvm::MachineIRBuilder::getMF(), llvm::GMemOperation::getMMO(), getNarrowTypeBreakDown(), llvm::GLoadStore::getPointerReg(), llvm::GenericMachineInstr::getReg(), llvm::LLT::getSizeInBits(), llvm::MachineRegisterInfo::getType(), llvm::LocationSize::getValue(), Idx, llvm::GMemOperation::isAtomic(), llvm::DataLayout::isBigEndian(), isBigEndian(), llvm::LLT::isValid(), Legalized, LLVM_DEBUG, llvm::MachineIRBuilder::materializePtrAdd(), MIRBuilder, llvm::Offset, llvm::LLT::scalar(), llvm::SmallVectorBase< Size_T >::size(), and UnableToLegalize.
Referenced by llvm::AMDGPURegisterBankInfo::applyMappingLoad(), fewerElementsVector(), lowerLoad(), lowerStore(), and narrowScalar().
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 2525 of file LegalizerHelper.cpp.
References assert(), llvm::APFloat::bitcastToAPInt(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildLShr(), llvm::MachineIRBuilder::buildOr(), llvm::MachineIRBuilder::buildShl(), llvm::MachineIRBuilder::buildSub(), llvm::MachineIRBuilder::buildTrunc(), llvm::MachineIRBuilder::buildZExtOrTrunc(), llvm::GISelChangeObserver::changedInstr(), llvm::GISelChangeObserver::changingInstr(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::MCInstrInfo::get(), llvm::MachineIRBuilder::getBoolExtOp(), llvm::MachineOperand::getCImm(), llvm::Function::getContext(), llvm::LLT::getElementCount(), llvm::LLT::getElementType(), llvm::LegalizerInfo::getExtOpcodeForWideningConstant(), llvm::MachineBasicBlock::getFirstNonPHI(), llvm::MachineBasicBlock::getFirstTerminatorForward(), llvm::MachineOperand::getFPImm(), llvm::MachineFunction::getFunction(), llvm::MachineIRBuilder::getInsertPt(), llvm::MachineIRBuilder::getMBB(), llvm::MachineIRBuilder::getMF(), llvm::APInt::getOneBitSet(), llvm::LLT::getScalarSizeInBits(), llvm::LLT::getSizeInBits(), llvm::MachineIRBuilder::getTII(), llvm::MachineRegisterInfo::getType(), llvm::ConstantInt::getValue(), llvm::ConstantFP::getValueAPF(), I, llvm::LLT::isScalar(), llvm::CmpInst::isSigned(), llvm::LLT::isVector(), Legalized, MBB, MI, MIRBuilder, Observer, llvm::MachineOperand::setCImm(), llvm::MachineIRBuilder::setInsertPt(), llvm::MachineIRBuilder::setInstrAndDebugLoc(), llvm::APInt::sext(), UnableToLegalize, llvm::LLT::vector(), widenScalarDst(), widenScalarSrc(), and llvm::APInt::zext().
Referenced by llvm::AMDGPURegisterBankInfo::applyMappingImpl(), and legalizeInstrStep().
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 1946 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().
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 1932 of file LegalizerHelper.cpp.
References llvm::MachineIRBuilder::buildInstr(), MI, MIRBuilder, and llvm::MachineOperand::setReg().
Referenced by widenScalar().
MachineIRBuilder& llvm::LegalizerHelper::MIRBuilder |
Expose MIRBuilder so clients can set their own RecordInsertInstruction functions.
Definition at line 51 of file LegalizerHelper.h.
Referenced by bitcastDst(), bitcastExtractVectorElt(), bitcastInsertVectorElt(), bitcastSrc(), llvm::AMDGPULegalizerInfo::buildMultiply(), coerceToScalar(), convertPtrToInt(), createStackTemporary(), equalizeVectorShuffleLengths(), fewerElementsBitcast(), fewerElementsVectorExtractInsertVectorElt(), fewerElementsVectorMerge(), fewerElementsVectorMultiEltType(), fewerElementsVectorPhi(), fewerElementsVectorReductions(), fewerElementsVectorSeqReductions(), fewerElementsVectorShuffle(), fewerElementsVectorUnmergeValues(), getDynStackAllocTargetPtr(), getVectorElementPointer(), llvm::AArch64LegalizerInfo::legalizeCustom(), llvm::AMDGPULegalizerInfo::legalizeCustom(), llvm::ARMLegalizerInfo::legalizeCustom(), llvm::MipsLegalizerInfo::legalizeCustom(), llvm::RISCVLegalizerInfo::legalizeCustom(), llvm::SPIRVLegalizerInfo::legalizeCustom(), llvm::X86LegalizerInfo::legalizeCustom(), legalizeInstrStep(), llvm::AArch64LegalizerInfo::legalizeIntrinsic(), llvm::AMDGPULegalizerInfo::legalizeIntrinsic(), llvm::MipsLegalizerInfo::legalizeIntrinsic(), llvm::RISCVLegalizerInfo::legalizeIntrinsic(), llvm::AMDGPULegalizerInfo::legalizeLaneOp(), llvm::AMDGPULegalizerInfo::legalizeLoad(), llvm::Legalizer::legalizeMachineFunction(), llvm::AMDGPULegalizerInfo::legalizeMinNumMaxNum(), llvm::AMDGPULegalizerInfo::legalizeMul(), llvm::AMDGPULegalizerInfo::legalizeSBufferLoad(), llvm::AMDGPULegalizerInfo::legalizeStore(), libcall(), lower(), lowerAbsToAddXor(), lowerAbsToCNeg(), lowerAbsToMaxNeg(), lowerAddSubSatToAddoSubo(), lowerAddSubSatToMinMax(), lowerBitcast(), lowerBitCount(), lowerBitreverse(), lowerBswap(), lowerConstant(), lowerDIVREM(), lowerDynStackAlloc(), lowerEXT(), lowerExtract(), lowerExtractInsertVectorElt(), lowerFConstant(), lowerFCopySign(), lowerFFloor(), lowerFMad(), lowerFMinNumMaxNum(), lowerFPOWI(), lowerFPTOSI(), lowerFPTOUI(), lowerFPTRUNC_F64_TO_F16(), lowerFunnelShiftAsShifts(), lowerFunnelShiftWithInverse(), lowerInsert(), lowerIntrinsicRound(), lowerISFPCLASS(), lowerLoad(), lowerMergeValues(), lowerMinMax(), lowerReadWriteRegister(), lowerRotate(), lowerRotateWithReverseRotate(), lowerSADDO_SSUBO(), lowerSelect(), lowerShlSat(), lowerShuffleVector(), lowerSITOFP(), lowerSMULH_UMULH(), lowerStackRestore(), lowerStackSave(), lowerStore(), lowerThreewayCompare(), lowerTRUNC(), lowerU64ToF32BitOps(), lowerUITOFP(), lowerUnmergeValues(), lowerVAArg(), lowerVECTOR_COMPRESS(), lowerVectorReduction(), moreElementsVector(), moreElementsVectorDst(), moreElementsVectorPhi(), moreElementsVectorShuffle(), moreElementsVectorSrc(), narrowScalar(), narrowScalarAddSub(), narrowScalarBasic(), narrowScalarCTLZ(), narrowScalarCTPOP(), narrowScalarCTTZ(), narrowScalarDst(), narrowScalarExtract(), narrowScalarFLDEXP(), narrowScalarInsert(), narrowScalarMul(), narrowScalarSelect(), narrowScalarShift(), narrowScalarShiftByConstant(), narrowScalarSrc(), reduceLoadStoreWidth(), widenScalar(), widenScalarDst(), and widenScalarSrc().
GISelChangeObserver& llvm::LegalizerHelper::Observer |
To keep track of changes made by the LegalizerHelper.
Definition at line 54 of file LegalizerHelper.h.
Referenced by bitcast(), llvm::AArch64LegalizerInfo::legalizeCustom(), llvm::RISCVLegalizerInfo::legalizeCustom(), llvm::AArch64LegalizerInfo::legalizeIntrinsic(), llvm::AMDGPULegalizerInfo::legalizeIntrinsic(), llvm::AMDGPULegalizerInfo::legalizeLoad(), llvm::AMDGPULegalizerInfo::legalizeSBufferLoad(), llvm::AMDGPULegalizerInfo::legalizeStore(), lower(), lowerBitCount(), lowerVectorReduction(), moreElementsVector(), moreElementsVectorPhi(), narrowScalar(), narrowScalarFLDEXP(), narrowScalarFPTOI(), narrowScalarShift(), and widenScalar().