LLVM
8.0.1
|
#include "llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h"
Public Member Functions | |
LegalizationArtifactCombiner (MachineIRBuilder &B, MachineRegisterInfo &MRI, const LegalizerInfo &LI) | |
bool | tryCombineAnyExt (MachineInstr &MI, SmallVectorImpl< MachineInstr *> &DeadInsts) |
bool | tryCombineZExt (MachineInstr &MI, SmallVectorImpl< MachineInstr *> &DeadInsts) |
bool | tryCombineSExt (MachineInstr &MI, SmallVectorImpl< MachineInstr *> &DeadInsts) |
bool | tryFoldImplicitDef (MachineInstr &MI, SmallVectorImpl< MachineInstr *> &DeadInsts) |
Try to fold G_[ASZ]EXT (G_IMPLICIT_DEF). More... | |
bool | tryCombineMerges (MachineInstr &MI, SmallVectorImpl< MachineInstr *> &DeadInsts) |
bool | tryCombineInstruction (MachineInstr &MI, SmallVectorImpl< MachineInstr *> &DeadInsts) |
Try to combine away MI. More... | |
Definition at line 27 of file LegalizationArtifactCombiner.h.
|
inline |
Definition at line 33 of file LegalizationArtifactCombiner.h.
|
inline |
Definition at line 37 of file LegalizationArtifactCombiner.h.
References llvm::MachineIRBuilder::buildAnyExtOrTrunc(), llvm::MachineIRBuilder::buildInstr(), llvm::dbgs(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getVRegDef(), LLVM_DEBUG, llvm::MIPatternMatch::m_all_of(), llvm::MIPatternMatch::m_any_of(), llvm::MIPatternMatch::m_GAnyExt(), llvm::MIPatternMatch::m_GSExt(), llvm::MIPatternMatch::m_GTrunc(), llvm::MIPatternMatch::m_GZExt(), llvm::MIPatternMatch::m_MInstr(), llvm::MIPatternMatch::m_Reg(), llvm::MIPatternMatch::mi_match(), and llvm::MachineIRBuilder::setInstr().
|
inline |
Try to combine away MI.
Returns true if it combined away the MI. Adds instructions that are dead as a result of the combine into DeadInsts, which can include MI.
Definition at line 255 of file LegalizationArtifactCombiner.h.
References llvm::LegalizeActionStep::Action, assert(), DefMI, llvm::LegalizerInfo::getAction(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), getReg(), llvm::MachineRegisterInfo::getType(), llvm::MachineRegisterInfo::getVRegDef(), llvm::MachineRegisterInfo::hasOneUse(), llvm::LLT::isValid(), llvm::MIPatternMatch::m_Copy(), llvm::MIPatternMatch::m_Reg(), MI, llvm::MIPatternMatch::mi_match(), llvm::LegalizeActions::NotFound, llvm::SmallVectorTemplateBase< T, bool >::push_back(), Query(), Reg, llvm::LegalizeActions::Unsupported, and llvm::MachineRegisterInfo::use_instructions().
|
inline |
Definition at line 165 of file LegalizationArtifactCombiner.h.
References llvm::MachineIRBuilder::buildMerge(), llvm::MachineIRBuilder::buildUnmerge(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::getOpcodeDef(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getType(), llvm::LLT::isVector(), MRI, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::MachineRegisterInfo::replaceRegWith(), and llvm::MachineIRBuilder::setInstr().
|
inline |
Definition at line 98 of file LegalizationArtifactCombiner.h.
References llvm::MachineIRBuilder::buildAnyExtOrTrunc(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildInstr(), llvm::dbgs(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::LLT::getSizeInBits(), llvm::MachineRegisterInfo::getType(), llvm::MachineRegisterInfo::getVRegDef(), LLVM_DEBUG, llvm::MIPatternMatch::m_GTrunc(), llvm::MIPatternMatch::m_Reg(), llvm::MIPatternMatch::mi_match(), and llvm::MachineIRBuilder::setInstr().
|
inline |
Definition at line 69 of file LegalizationArtifactCombiner.h.
References llvm::MachineIRBuilder::buildAnd(), llvm::MachineIRBuilder::buildAnyExtOrTrunc(), llvm::MachineIRBuilder::buildConstant(), llvm::dbgs(), llvm::APInt::getAllOnesValue(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getType(), llvm::MachineRegisterInfo::getVRegDef(), llvm::APInt::getZExtValue(), LLVM_DEBUG, llvm::MIPatternMatch::m_GTrunc(), llvm::MIPatternMatch::m_Reg(), llvm::BitmaskEnumDetail::Mask(), llvm::MIPatternMatch::mi_match(), and llvm::MachineIRBuilder::setInstr().
|
inline |
Try to fold G_[ASZ]EXT (G_IMPLICIT_DEF).
Definition at line 131 of file LegalizationArtifactCombiner.h.
References llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildInstr(), llvm::dbgs(), DefMI, llvm::MachineInstr::getOpcode(), llvm::getOpcodeDef(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getType(), LLVM_DEBUG, MRI, and llvm::MachineIRBuilder::setInstr().