LLVM API Documentation

llvm::PatternMatch Namespace Reference


Classes

struct  leaf_ty
struct  bind_ty
struct  BinaryOp_match
struct  BinaryOpClass_match
struct  neg_match
struct  not_match
struct  brc_match

Functions

template<typename Val, typename Pattern>
bool match (Val *V, const Pattern &P)
leaf_ty< Valuem_Value ()
leaf_ty< ConstantIntm_ConstantInt ()
bind_ty< Valuem_Value (Value *&V)
bind_ty< ConstantIntm_ConstantInt (ConstantInt *&CI)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS,
Instruction::Add > 
m_Add (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS,
Instruction::Sub > 
m_Sub (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS,
Instruction::Mul > 
m_Mul (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS,
Instruction::Div > 
m_Div (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS,
Instruction::Rem > 
m_Rem (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS,
Instruction::And > 
m_And (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS,
Instruction::Or > 
m_Or (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS,
Instruction::Xor > 
m_Xor (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS,
Instruction::Shl, ShiftInst
m_Shl (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS,
Instruction::Shr, ShiftInst
m_Shr (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOpClass_match< LHS,
RHS, SetCondInst, Instruction::BinaryOps
m_SetCond (Instruction::BinaryOps &Op, const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOpClass_match< LHS,
RHS, ShiftInst, Instruction::OtherOps
m_Shift (Instruction::OtherOps &Op, const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOpClass_match< LHS,
RHS, ShiftInst, Instruction::OtherOps
m_Shift (const LHS &L, const RHS &R)
template<typename LHS>
neg_match< LHS > m_Neg (const LHS &L)
template<typename LHS>
not_match< LHS > m_Not (const LHS &L)
template<typename Cond_t>
brc_match< Cond_t > m_Br (const Cond_t &C, BasicBlock *&T, BasicBlock *&F)


Function Documentation

template<typename LHS, typename RHS>
BinaryOp_match<LHS, RHS, Instruction::Add> llvm::PatternMatch::m_Add ( const LHS &  L,
const RHS &  R 
) [inline]

Definition at line 97 of file PatternMatch.h.

template<typename LHS, typename RHS>
BinaryOp_match<LHS, RHS, Instruction::And> llvm::PatternMatch::m_And ( const LHS &  L,
const RHS &  R 
) [inline]

Definition at line 127 of file PatternMatch.h.

Referenced by CollectBSwapParts(), and AddMaskingAnd::shouldApply().

template<typename Cond_t>
brc_match<Cond_t> llvm::PatternMatch::m_Br ( const Cond_t &  C,
BasicBlock *&  T,
BasicBlock *&  F 
) [inline]

Definition at line 301 of file PatternMatch.h.

References F, and T.

bind_ty<ConstantInt> llvm::PatternMatch::m_ConstantInt ( ConstantInt *&  CI  )  [inline]

Definition at line 68 of file PatternMatch.h.

Referenced by CollectBSwapParts(), and AddMaskingAnd::shouldApply().

leaf_ty<ConstantInt> llvm::PatternMatch::m_ConstantInt (  )  [inline]

Definition at line 50 of file PatternMatch.h.

template<typename LHS, typename RHS>
BinaryOp_match<LHS, RHS, Instruction::Div> llvm::PatternMatch::m_Div ( const LHS &  L,
const RHS &  R 
) [inline]

Definition at line 115 of file PatternMatch.h.

template<typename LHS, typename RHS>
BinaryOp_match<LHS, RHS, Instruction::Mul> llvm::PatternMatch::m_Mul ( const LHS &  L,
const RHS &  R 
) [inline]

Definition at line 109 of file PatternMatch.h.

template<typename LHS>
neg_match<LHS> llvm::PatternMatch::m_Neg ( const LHS &  L  )  [inline]

Definition at line 240 of file PatternMatch.h.

template<typename LHS>
not_match<LHS> llvm::PatternMatch::m_Not ( const LHS &  L  )  [inline]

Definition at line 272 of file PatternMatch.h.

template<typename LHS, typename RHS>
BinaryOp_match<LHS, RHS, Instruction::Or> llvm::PatternMatch::m_Or ( const LHS &  L,
const RHS &  R 
) [inline]

Definition at line 133 of file PatternMatch.h.

template<typename LHS, typename RHS>
BinaryOp_match<LHS, RHS, Instruction::Rem> llvm::PatternMatch::m_Rem ( const LHS &  L,
const RHS &  R 
) [inline]

Definition at line 121 of file PatternMatch.h.

template<typename LHS, typename RHS>
BinaryOpClass_match<LHS, RHS, SetCondInst, Instruction::BinaryOps> llvm::PatternMatch::m_SetCond ( Instruction::BinaryOps &  Op,
const LHS &  L,
const RHS &  R 
) [inline]

Definition at line 188 of file PatternMatch.h.

template<typename LHS, typename RHS>
BinaryOpClass_match<LHS, RHS, ShiftInst, Instruction::OtherOps> llvm::PatternMatch::m_Shift ( const LHS &  L,
const RHS &  R 
) [inline]

Definition at line 202 of file PatternMatch.h.

References Op.

Referenced by CollectBSwapParts().

template<typename LHS, typename RHS>
BinaryOpClass_match<LHS, RHS, ShiftInst, Instruction::OtherOps> llvm::PatternMatch::m_Shift ( Instruction::OtherOps &  Op,
const LHS &  L,
const RHS &  R 
) [inline]

Definition at line 195 of file PatternMatch.h.

template<typename LHS, typename RHS>
BinaryOp_match<LHS, RHS, Instruction::Shl, ShiftInst> llvm::PatternMatch::m_Shl ( const LHS &  L,
const RHS &  R 
) [inline]

Definition at line 146 of file PatternMatch.h.

template<typename LHS, typename RHS>
BinaryOp_match<LHS, RHS, Instruction::Shr, ShiftInst> llvm::PatternMatch::m_Shr ( const LHS &  L,
const RHS &  R 
) [inline]

Definition at line 152 of file PatternMatch.h.

template<typename LHS, typename RHS>
BinaryOp_match<LHS, RHS, Instruction::Sub> llvm::PatternMatch::m_Sub ( const LHS &  L,
const RHS &  R 
) [inline]

Definition at line 103 of file PatternMatch.h.

bind_ty<Value> llvm::PatternMatch::m_Value ( Value *&  V  )  [inline]

Definition at line 67 of file PatternMatch.h.

References V.

Referenced by CollectBSwapParts(), and AddMaskingAnd::shouldApply().

leaf_ty<Value> llvm::PatternMatch::m_Value (  )  [inline]

Definition at line 49 of file PatternMatch.h.

template<typename LHS, typename RHS>
BinaryOp_match<LHS, RHS, Instruction::Xor> llvm::PatternMatch::m_Xor ( const LHS &  L,
const RHS &  R 
) [inline]

Definition at line 139 of file PatternMatch.h.

template<typename Val, typename Pattern>
bool llvm::PatternMatch::match ( Val V,
const Pattern &  P 
)

Definition at line 39 of file PatternMatch.h.

Referenced by CollectBSwapParts(), and AddMaskingAnd::shouldApply().