LLVM 17.0.0git
|
This class provides utilities for finding source registers of specific bit ranges in an artifact. More...
#include "llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h"
Public Member Functions | |
ArtifactValueFinder (MachineRegisterInfo &Mri, MachineIRBuilder &Builder, const LegalizerInfo &Info) | |
Register | findValueFromDef (Register DefReg, unsigned StartBit, unsigned Size) |
Try to find a source of the value defined in the def DefReg , starting at position StartBit with size Size . | |
bool | tryCombineUnmergeDefs (GUnmerge &MI, GISelChangeObserver &Observer, SmallVectorImpl< Register > &UpdatedDefs) |
Try to combine the defs of an unmerge MI by attempting to find values that provides the bits for each def reg. | |
GUnmerge * | findUnmergeThatDefinesReg (Register Reg, unsigned Size, unsigned &DefOperandIdx) |
bool | isSequenceFromUnmerge (GMergeLikeInstr &MI, unsigned MergeStartIdx, GUnmerge *Unmerge, unsigned UnmergeIdxStart, unsigned NumElts, unsigned EltSize) |
bool | tryCombineMergeLike (GMergeLikeInstr &MI, SmallVectorImpl< MachineInstr * > &DeadInsts, SmallVectorImpl< Register > &UpdatedDefs, GISelChangeObserver &Observer) |
This class provides utilities for finding source registers of specific bit ranges in an artifact.
The routines can look through the source registers if they're other artifacts to try to find a non-artifact source of a value.
Definition at line 556 of file LegalizationArtifactCombiner.h.
|
inline |
Definition at line 768 of file LegalizationArtifactCombiner.h.
|
inline |
Definition at line 815 of file LegalizationArtifactCombiner.h.
References MRI, Reg, and Size.
Referenced by isSequenceFromUnmerge(), and tryCombineMergeLike().
|
inline |
Try to find a source of the value defined in the def DefReg
, starting at position StartBit
with size Size
.
Definition at line 776 of file LegalizationArtifactCombiner.h.
References Size.
Referenced by tryCombineUnmergeDefs().
|
inline |
Definition at line 829 of file LegalizationArtifactCombiner.h.
References assert(), findUnmergeThatDefinesReg(), and MI.
Referenced by tryCombineMergeLike().
|
inline |
Definition at line 847 of file LegalizationArtifactCombiner.h.
References llvm::MachineIRBuilder::buildMergeLikeInstr(), llvm::MachineIRBuilder::buildUnmerge(), findUnmergeThatDefinesReg(), llvm::getCoverTy(), llvm::LLT::getSizeInBits(), isSequenceFromUnmerge(), llvm::LLT::isVector(), MI, MRI, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::LegalizationArtifactCombiner::replaceRegOrBuildCopy(), and llvm::MachineIRBuilder::setInstrAndDebugLoc().
Referenced by llvm::LegalizationArtifactCombiner::tryCombineInstruction().
|
inline |
Try to combine the defs of an unmerge MI
by attempting to find values that provides the bits for each def reg.
Definition at line 786 of file LegalizationArtifactCombiner.h.
References llvm::SmallBitVector::all(), llvm::GISelChangeObserver::changedInstr(), llvm::GISelChangeObserver::changingInstr(), findValueFromDef(), llvm::LLT::getSizeInBits(), MI, MRI, and llvm::LegalizationArtifactCombiner::replaceRegOrBuildCopy().
Referenced by llvm::LegalizationArtifactCombiner::tryCombineUnmergeValues().