LLVM API Documentation

llvm::PatternMatch Namespace Reference


Classes

struct  leaf_ty
struct  constantint_ty
struct  zero_ty
struct  bind_ty
struct  specificval_ty
 specificval_ty - Match a specified Value*. More...
struct  BinaryOp_match
struct  Shr_match
struct  BinaryOpClass_match
struct  CmpClass_match
struct  SelectClass_match
struct  CastClass_match
struct  not_match
struct  neg_match
struct  brc_match

Functions

template<typename Val, typename Pattern>
bool match (Val *V, const Pattern &P)
leaf_ty< Valuem_Value ()
 m_Value() - Match an arbitrary value and ignore it.
leaf_ty< ConstantIntm_ConstantInt ()
 m_ConstantInt() - Match an arbitrary ConstantInt and ignore it.
zero_ty m_Zero ()
 m_Zero() - Match an arbitrary zero/null constant.
bind_ty< Valuem_Value (Value *&V)
 m_Value - Match a value, capturing it if we match.
bind_ty< ConstantIntm_ConstantInt (ConstantInt *&CI)
 m_ConstantInt - Match a ConstantInt, capturing the value if we match.
specificval_ty m_Specific (const Value *V)
 m_Specific - Match if we have a specific specified value.
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::UDiv > 
m_UDiv (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS,
Instruction::SDiv > 
m_SDiv (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS,
Instruction::FDiv > 
m_FDiv (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS,
Instruction::URem > 
m_URem (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS,
Instruction::SRem > 
m_SRem (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS,
Instruction::FRem > 
m_FRem (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 > 
m_Shl (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS,
Instruction::LShr
m_LShr (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS,
Instruction::AShr > 
m_AShr (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
Shr_match< LHS, RHSm_Shr (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOpClass_match< LHS, RHS,
BinaryOperator,
Instruction::BinaryOps
m_Shift (Instruction::BinaryOps &Op, const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOpClass_match< LHS, RHS,
BinaryOperator,
Instruction::BinaryOps
m_Shift (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
CmpClass_match< LHS, RHS,
ICmpInst, ICmpInst::Predicate
m_ICmp (ICmpInst::Predicate &Pred, const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
CmpClass_match< LHS, RHS,
FCmpInst, FCmpInst::Predicate
m_FCmp (FCmpInst::Predicate &Pred, const LHS &L, const RHS &R)
template<typename Cond, typename LHS, typename RHS>
SelectClass_match< Cond, RHS, LHSm_Select (const Cond &C, const LHS &L, const RHS &R)
template<int64_t L, int64_t R, typename Cond>
SelectClass_match< Cond,
constantint_ty< L >
, constantint_ty< R > > 
m_SelectCst (const Cond &C)
template<typename Class, typename OpTy>
CastClass_match< OpTy, Class > m_Cast (const OpTy &Op)
template<typename LHS>
not_match< LHSm_Not (const LHS &L)
template<typename LHS>
neg_match< LHSm_Neg (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 154 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 208 of file PatternMatch.h.

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

Definition at line 238 of file PatternMatch.h.

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

Definition at line 524 of file PatternMatch.h.

template<typename Class, typename OpTy>
CastClass_match<OpTy, Class> llvm::PatternMatch::m_Cast ( const OpTy &  Op  )  [inline]

Definition at line 423 of file PatternMatch.h.

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

m_ConstantInt - Match a ConstantInt, capturing the value if we match.

Definition at line 110 of file PatternMatch.h.

constantint_ty< Val > llvm::PatternMatch::m_ConstantInt (  )  [inline]

m_ConstantInt() - Match an arbitrary ConstantInt and ignore it.

m_ConstantInt(int64_t) - Match a ConstantInt with a specific value and ignore it.

Definition at line 52 of file PatternMatch.h.

template<typename LHS, typename RHS>
CmpClass_match<LHS, RHS, FCmpInst, FCmpInst::Predicate> llvm::PatternMatch::m_FCmp ( FCmpInst::Predicate Pred,
const LHS L,
const RHS R 
) [inline]

Definition at line 358 of file PatternMatch.h.

References LHS, and RHS.

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

Definition at line 184 of file PatternMatch.h.

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

Definition at line 202 of file PatternMatch.h.

template<typename LHS, typename RHS>
CmpClass_match<LHS, RHS, ICmpInst, ICmpInst::Predicate> llvm::PatternMatch::m_ICmp ( ICmpInst::Predicate Pred,
const LHS L,
const RHS R 
) [inline]

Definition at line 351 of file PatternMatch.h.

References LHS, and RHS.

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

Definition at line 232 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 166 of file PatternMatch.h.

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

Definition at line 494 of file PatternMatch.h.

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

Definition at line 465 of file PatternMatch.h.

Referenced by MatchSelectFromAndOr().

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 214 of file PatternMatch.h.

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

Definition at line 178 of file PatternMatch.h.

template<typename Cond, typename LHS, typename RHS>
SelectClass_match<Cond, RHS, LHS> llvm::PatternMatch::m_Select ( const Cond &  C,
const LHS L,
const RHS R 
) [inline]

Definition at line 389 of file PatternMatch.h.

template<int64_t L, int64_t R, typename Cond>
SelectClass_match<Cond, constantint_ty<L>, constantint_ty<R> > llvm::PatternMatch::m_SelectCst ( const Cond &  C  )  [inline]

m_SelectCst - This matches a select of two constants, e.g.: m_SelectCst(m_Value(V), -1, 0)

Definition at line 397 of file PatternMatch.h.

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

Definition at line 319 of file PatternMatch.h.

References LHS, and RHS.

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

Definition at line 312 of file PatternMatch.h.

References LHS, and RHS.

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

Definition at line 226 of file PatternMatch.h.

template<typename LHS, typename RHS>
Shr_match<LHS, RHS> llvm::PatternMatch::m_Shr ( const LHS L,
const RHS R 
) [inline]

Definition at line 273 of file PatternMatch.h.

specificval_ty llvm::PatternMatch::m_Specific ( const Value *  V  )  [inline]

m_Specific - Match if we have a specific specified value.

Definition at line 124 of file PatternMatch.h.

Referenced by MatchSelectFromAndOr().

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

Definition at line 196 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 160 of file PatternMatch.h.

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

Definition at line 172 of file PatternMatch.h.

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

Definition at line 190 of file PatternMatch.h.

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

m_Value - Match a value, capturing it if we match.

Definition at line 107 of file PatternMatch.h.

Referenced by MatchSelectFromAndOr().

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

m_Value() - Match an arbitrary value and ignore it.

Definition at line 50 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 220 of file PatternMatch.h.

zero_ty llvm::PatternMatch::m_Zero (  )  [inline]

m_Zero() - Match an arbitrary zero/null constant.

Definition at line 88 of file PatternMatch.h.

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

Definition at line 39 of file PatternMatch.h.

Referenced by MatchSelectFromAndOr().




This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.