LLVM  10.0.0svn
Classes | Functions
llvm::MIPatternMatch Namespace Reference

Classes

struct  And
 Matching combinators. More...
 
struct  And< Pred, Preds... >
 
struct  BinaryOp_match
 
struct  bind_helper
 
struct  bind_helper< const ConstantFP * >
 
struct  bind_helper< LLT >
 
struct  bind_helper< MachineInstr * >
 
struct  bind_ty
 
struct  CheckType
 
struct  ConstantMatch
 
struct  OneUse_match
 
struct  operand_type_match
 
struct  Or
 
struct  Or< Pred, Preds... >
 
struct  UnaryOp_match
 

Functions

template<typename Reg , typename Pattern >
bool mi_match (Reg R, const MachineRegisterInfo &MRI, Pattern &&P)
 
template<typename SubPat >
OneUse_match< SubPat > m_OneUse (const SubPat &SP)
 
ConstantMatch m_ICst (int64_t &Cst)
 
operand_type_match m_Reg ()
 
template<typename... Preds>
And< Preds... > m_all_of (Preds &&... preds)
 
template<typename... Preds>
Or< Preds... > m_any_of (Preds &&... preds)
 
bind_ty< Registerm_Reg (Register &R)
 
bind_ty< MachineInstr * > m_MInstr (MachineInstr *&MI)
 
bind_ty< LLTm_Type (LLT &Ty)
 
bind_ty< const ConstantFP * > m_GFCst (const ConstantFP *&C)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_ADD, truem_GAdd (const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_SUB > m_GSub (const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_MUL, truem_GMul (const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_FADD, truem_GFAdd (const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_FMUL, truem_GFMul (const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_FSUB, falsem_GFSub (const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_AND, truem_GAnd (const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_OR, truem_GOr (const LHS &L, const RHS &R)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_ANYEXT > m_GAnyExt (const SrcTy &Src)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_SEXT > m_GSExt (const SrcTy &Src)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_ZEXT > m_GZExt (const SrcTy &Src)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_FPEXT > m_GFPExt (const SrcTy &Src)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_TRUNC > m_GTrunc (const SrcTy &Src)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_BITCAST > m_GBitcast (const SrcTy &Src)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_PTRTOINT > m_GPtrToInt (const SrcTy &Src)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_INTTOPTR > m_GIntToPtr (const SrcTy &Src)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_FPTRUNC > m_GFPTrunc (const SrcTy &Src)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_FABS > m_GFabs (const SrcTy &Src)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_FNEG > m_GFNeg (const SrcTy &Src)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::COPY > m_Copy (SrcTy &&Src)
 
CheckType m_SpecificType (LLT Ty)
 

Function Documentation

◆ m_all_of()

template<typename... Preds>
And<Preds...> llvm::MIPatternMatch::m_all_of ( Preds &&...  preds)

◆ m_any_of()

template<typename... Preds>
Or<Preds...> llvm::MIPatternMatch::m_any_of ( Preds &&...  preds)

◆ m_Copy()

template<typename SrcTy >
UnaryOp_match<SrcTy, TargetOpcode::COPY> llvm::MIPatternMatch::m_Copy ( SrcTy &&  Src)
inline

◆ m_GAdd()

template<typename LHS , typename RHS >
BinaryOp_match<LHS, RHS, TargetOpcode::G_ADD, true> llvm::MIPatternMatch::m_GAdd ( const LHS &  L,
const RHS &  R 
)
inline

Definition at line 195 of file MIPatternMatch.h.

Referenced by getBaseWithConstantOffset().

◆ m_GAnd()

template<typename LHS , typename RHS >
BinaryOp_match<LHS, RHS, TargetOpcode::G_AND, true> llvm::MIPatternMatch::m_GAnd ( const LHS &  L,
const RHS &  R 
)
inline

Definition at line 231 of file MIPatternMatch.h.

◆ m_GAnyExt()

template<typename SrcTy >
UnaryOp_match<SrcTy, TargetOpcode::G_ANYEXT> llvm::MIPatternMatch::m_GAnyExt ( const SrcTy &  Src)
inline

◆ m_GBitcast()

template<typename SrcTy >
UnaryOp_match<SrcTy, TargetOpcode::G_BITCAST> llvm::MIPatternMatch::m_GBitcast ( const SrcTy &  Src)
inline

Definition at line 286 of file MIPatternMatch.h.

◆ m_GFabs()

template<typename SrcTy >
UnaryOp_match<SrcTy, TargetOpcode::G_FABS> llvm::MIPatternMatch::m_GFabs ( const SrcTy &  Src)
inline

Definition at line 309 of file MIPatternMatch.h.

◆ m_GFAdd()

template<typename LHS , typename RHS >
BinaryOp_match<LHS, RHS, TargetOpcode::G_FADD, true> llvm::MIPatternMatch::m_GFAdd ( const LHS &  L,
const RHS &  R 
)
inline

Definition at line 213 of file MIPatternMatch.h.

◆ m_GFCst()

bind_ty<const ConstantFP *> llvm::MIPatternMatch::m_GFCst ( const ConstantFP *&  C)
inline

Definition at line 168 of file MIPatternMatch.h.

References C, and llvm::MCID::Commutable.

◆ m_GFMul()

template<typename LHS , typename RHS >
BinaryOp_match<LHS, RHS, TargetOpcode::G_FMUL, true> llvm::MIPatternMatch::m_GFMul ( const LHS &  L,
const RHS &  R 
)
inline

Definition at line 219 of file MIPatternMatch.h.

◆ m_GFNeg()

template<typename SrcTy >
UnaryOp_match<SrcTy, TargetOpcode::G_FNEG> llvm::MIPatternMatch::m_GFNeg ( const SrcTy &  Src)
inline

Definition at line 314 of file MIPatternMatch.h.

◆ m_GFPExt()

template<typename SrcTy >
UnaryOp_match<SrcTy, TargetOpcode::G_FPEXT> llvm::MIPatternMatch::m_GFPExt ( const SrcTy &  Src)
inline

Definition at line 275 of file MIPatternMatch.h.

◆ m_GFPTrunc()

template<typename SrcTy >
UnaryOp_match<SrcTy, TargetOpcode::G_FPTRUNC> llvm::MIPatternMatch::m_GFPTrunc ( const SrcTy &  Src)
inline

Definition at line 304 of file MIPatternMatch.h.

◆ m_GFSub()

template<typename LHS , typename RHS >
BinaryOp_match<LHS, RHS, TargetOpcode::G_FSUB, false> llvm::MIPatternMatch::m_GFSub ( const LHS &  L,
const RHS &  R 
)
inline

Definition at line 225 of file MIPatternMatch.h.

◆ m_GIntToPtr()

template<typename SrcTy >
UnaryOp_match<SrcTy, TargetOpcode::G_INTTOPTR> llvm::MIPatternMatch::m_GIntToPtr ( const SrcTy &  Src)
inline

Definition at line 298 of file MIPatternMatch.h.

◆ m_GMul()

template<typename LHS , typename RHS >
BinaryOp_match<LHS, RHS, TargetOpcode::G_MUL, true> llvm::MIPatternMatch::m_GMul ( const LHS &  L,
const RHS &  R 
)
inline

Definition at line 207 of file MIPatternMatch.h.

◆ m_GOr()

template<typename LHS , typename RHS >
BinaryOp_match<LHS, RHS, TargetOpcode::G_OR, true> llvm::MIPatternMatch::m_GOr ( const LHS &  L,
const RHS &  R 
)
inline

Definition at line 236 of file MIPatternMatch.h.

◆ m_GPtrToInt()

template<typename SrcTy >
UnaryOp_match<SrcTy, TargetOpcode::G_PTRTOINT> llvm::MIPatternMatch::m_GPtrToInt ( const SrcTy &  Src)
inline

Definition at line 292 of file MIPatternMatch.h.

◆ m_GSExt()

template<typename SrcTy >
UnaryOp_match<SrcTy, TargetOpcode::G_SEXT> llvm::MIPatternMatch::m_GSExt ( const SrcTy &  Src)
inline

◆ m_GSub()

template<typename LHS , typename RHS >
BinaryOp_match<LHS, RHS, TargetOpcode::G_SUB> llvm::MIPatternMatch::m_GSub ( const LHS &  L,
const RHS &  R 
)
inline

Definition at line 200 of file MIPatternMatch.h.

◆ m_GTrunc()

template<typename SrcTy >
UnaryOp_match<SrcTy, TargetOpcode::G_TRUNC> llvm::MIPatternMatch::m_GTrunc ( const SrcTy &  Src)
inline

◆ m_GZExt()

template<typename SrcTy >
UnaryOp_match<SrcTy, TargetOpcode::G_ZEXT> llvm::MIPatternMatch::m_GZExt ( const SrcTy &  Src)
inline

◆ m_ICst()

ConstantMatch llvm::MIPatternMatch::m_ICst ( int64_t &  Cst)
inline

◆ m_MInstr()

bind_ty<MachineInstr *> llvm::MIPatternMatch::m_MInstr ( MachineInstr *&  MI)
inline

◆ m_OneUse()

template<typename SubPat >
OneUse_match<SubPat> llvm::MIPatternMatch::m_OneUse ( const SubPat &  SP)
inline

Definition at line 39 of file MIPatternMatch.h.

Referenced by getNegatibleInsts().

◆ m_Reg() [1/2]

operand_type_match llvm::MIPatternMatch::m_Reg ( )
inline

◆ m_Reg() [2/2]

bind_ty<Register> llvm::MIPatternMatch::m_Reg ( Register R)
inline

Definition at line 163 of file MIPatternMatch.h.

◆ m_SpecificType()

CheckType llvm::MIPatternMatch::m_SpecificType ( LLT  Ty)
inline

Definition at line 333 of file MIPatternMatch.h.

◆ m_Type()

bind_ty<LLT> llvm::MIPatternMatch::m_Type ( LLT Ty)
inline

Definition at line 165 of file MIPatternMatch.h.

◆ mi_match()

template<typename Reg , typename Pattern >
bool llvm::MIPatternMatch::mi_match ( Reg  R,
const MachineRegisterInfo MRI,
Pattern &&  P 
)