LLVM  12.0.0git
Public Member Functions | Static Public Member Functions | List of all members
llvm::LegalizationArtifactCombiner Class Reference

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

Public Member Functions

 LegalizationArtifactCombiner (MachineIRBuilder &B, MachineRegisterInfo &MRI, const LegalizerInfo &LI)
 
bool tryCombineAnyExt (MachineInstr &MI, SmallVectorImpl< MachineInstr *> &DeadInsts, SmallVectorImpl< Register > &UpdatedDefs)
 
bool tryCombineZExt (MachineInstr &MI, SmallVectorImpl< MachineInstr *> &DeadInsts, SmallVectorImpl< Register > &UpdatedDefs, GISelObserverWrapper &Observer)
 
bool tryCombineSExt (MachineInstr &MI, SmallVectorImpl< MachineInstr *> &DeadInsts, SmallVectorImpl< Register > &UpdatedDefs)
 
bool tryCombineTrunc (MachineInstr &MI, SmallVectorImpl< MachineInstr *> &DeadInsts, SmallVectorImpl< Register > &UpdatedDefs, GISelObserverWrapper &Observer)
 
bool tryFoldImplicitDef (MachineInstr &MI, SmallVectorImpl< MachineInstr *> &DeadInsts, SmallVectorImpl< Register > &UpdatedDefs)
 Try to fold G_[ASZ]EXT (G_IMPLICIT_DEF). More...
 
bool tryFoldUnmergeCast (MachineInstr &MI, MachineInstr &CastMI, SmallVectorImpl< MachineInstr *> &DeadInsts, SmallVectorImpl< Register > &UpdatedDefs)
 
bool tryCombineMerges (MachineInstr &MI, SmallVectorImpl< MachineInstr *> &DeadInsts, SmallVectorImpl< Register > &UpdatedDefs, GISelObserverWrapper &Observer)
 
bool tryCombineExtract (MachineInstr &MI, SmallVectorImpl< MachineInstr *> &DeadInsts, SmallVectorImpl< Register > &UpdatedDefs)
 
bool tryCombineInstruction (MachineInstr &MI, SmallVectorImpl< MachineInstr *> &DeadInsts, GISelObserverWrapper &WrapperObserver)
 Try to combine away MI. More...
 

Static Public Member Functions

static bool canFoldMergeOpcode (unsigned MergeOp, unsigned ConvertOp, LLT OpTy, LLT DestTy)
 
static void replaceRegOrBuildCopy (Register DstReg, Register SrcReg, MachineRegisterInfo &MRI, MachineIRBuilder &Builder, SmallVectorImpl< Register > &UpdatedDefs, GISelObserverWrapper &Observer)
 Try to replace DstReg with SrcReg or build a COPY instruction depending on the register constraints. More...
 
static bool isMergeLikeOpcode (unsigned Opc)
 

Detailed Description

Definition at line 26 of file LegalizationArtifactCombiner.h.

Constructor & Destructor Documentation

◆ LegalizationArtifactCombiner()

llvm::LegalizationArtifactCombiner::LegalizationArtifactCombiner ( MachineIRBuilder B,
MachineRegisterInfo MRI,
const LegalizerInfo LI 
)
inline

Definition at line 44 of file LegalizationArtifactCombiner.h.

Member Function Documentation

◆ canFoldMergeOpcode()

static bool llvm::LegalizationArtifactCombiner::canFoldMergeOpcode ( unsigned  MergeOp,
unsigned  ConvertOp,
LLT  OpTy,
LLT  DestTy 
)
inlinestatic

◆ isMergeLikeOpcode()

static bool llvm::LegalizationArtifactCombiner::isMergeLikeOpcode ( unsigned  Opc)
inlinestatic

Definition at line 654 of file LegalizationArtifactCombiner.h.

◆ replaceRegOrBuildCopy()

static void llvm::LegalizationArtifactCombiner::replaceRegOrBuildCopy ( Register  DstReg,
Register  SrcReg,
MachineRegisterInfo MRI,
MachineIRBuilder Builder,
SmallVectorImpl< Register > &  UpdatedDefs,
GISelObserverWrapper Observer 
)
inlinestatic

◆ tryCombineAnyExt()

bool llvm::LegalizationArtifactCombiner::tryCombineAnyExt ( MachineInstr MI,
SmallVectorImpl< MachineInstr *> &  DeadInsts,
SmallVectorImpl< Register > &  UpdatedDefs 
)
inline

◆ tryCombineExtract()

bool llvm::LegalizationArtifactCombiner::tryCombineExtract ( MachineInstr MI,
SmallVectorImpl< MachineInstr *> &  DeadInsts,
SmallVectorImpl< Register > &  UpdatedDefs 
)
inline

◆ tryCombineInstruction()

bool llvm::LegalizationArtifactCombiner::tryCombineInstruction ( MachineInstr MI,
SmallVectorImpl< MachineInstr *> &  DeadInsts,
GISelObserverWrapper WrapperObserver 
)
inline

◆ tryCombineMerges()

bool llvm::LegalizationArtifactCombiner::tryCombineMerges ( MachineInstr MI,
SmallVectorImpl< MachineInstr *> &  DeadInsts,
SmallVectorImpl< Register > &  UpdatedDefs,
GISelObserverWrapper Observer 
)
inline

◆ tryCombineSExt()

bool llvm::LegalizationArtifactCombiner::tryCombineSExt ( MachineInstr MI,
SmallVectorImpl< MachineInstr *> &  DeadInsts,
SmallVectorImpl< Register > &  UpdatedDefs 
)
inline

◆ tryCombineTrunc()

bool llvm::LegalizationArtifactCombiner::tryCombineTrunc ( MachineInstr MI,
SmallVectorImpl< MachineInstr *> &  DeadInsts,
SmallVectorImpl< Register > &  UpdatedDefs,
GISelObserverWrapper Observer 
)
inline

◆ tryCombineZExt()

bool llvm::LegalizationArtifactCombiner::tryCombineZExt ( MachineInstr MI,
SmallVectorImpl< MachineInstr *> &  DeadInsts,
SmallVectorImpl< Register > &  UpdatedDefs,
GISelObserverWrapper Observer 
)
inline

◆ tryFoldImplicitDef()

bool llvm::LegalizationArtifactCombiner::tryFoldImplicitDef ( MachineInstr MI,
SmallVectorImpl< MachineInstr *> &  DeadInsts,
SmallVectorImpl< Register > &  UpdatedDefs 
)
inline

◆ tryFoldUnmergeCast()

bool llvm::LegalizationArtifactCombiner::tryFoldUnmergeCast ( MachineInstr MI,
MachineInstr CastMI,
SmallVectorImpl< MachineInstr *> &  DeadInsts,
SmallVectorImpl< Register > &  UpdatedDefs 
)
inline

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