LLVM API Documentation
Classes | |
struct | OneUse_match |
struct | class_match |
struct | match_combine_or |
Matching combinators. More... | |
struct | match_combine_and |
struct | match_zero |
struct | match_neg_zero |
struct | apint_match |
struct | constantint_match |
struct | cst_pred_ty |
struct | api_pred_ty |
struct | is_one |
struct | is_all_ones |
struct | is_sign_bit |
struct | is_power2 |
struct | bind_ty |
struct | specificval_ty |
specificval_ty - Match a specified Value*. More... | |
struct | specific_fpval |
struct | bind_const_intval_ty |
struct | specific_intval |
Match a specified integer value or vector of all elements of that value. More... | |
struct | BinaryOp_match |
struct | OverflowingBinaryOp_match |
struct | BinOp2_match |
struct | Exact_match |
struct | CmpClass_match |
struct | SelectClass_match |
struct | CastClass_match |
struct | not_match |
struct | neg_match |
struct | fneg_match |
struct | br_match |
struct | brc_match |
struct | MaxMin_match |
struct | smax_pred_ty |
smax_pred_ty - Helper class for identifying signed max predicates. More... | |
struct | smin_pred_ty |
smin_pred_ty - Helper class for identifying signed min predicates. More... | |
struct | umax_pred_ty |
umax_pred_ty - Helper class for identifying unsigned max predicates. More... | |
struct | umin_pred_ty |
umin_pred_ty - Helper class for identifying unsigned min predicates. More... | |
struct | ofmax_pred_ty |
ofmax_pred_ty - Helper class for identifying ordered max predicates. More... | |
struct | ofmin_pred_ty |
ofmin_pred_ty - Helper class for identifying ordered min predicates. More... | |
struct | ufmax_pred_ty |
ufmax_pred_ty - Helper class for identifying unordered max predicates. More... | |
struct | ufmin_pred_ty |
ufmin_pred_ty - Helper class for identifying unordered min predicates. More... | |
struct | Argument_match |
struct | IntrinsicID_match |
Intrinsic matchers. More... | |
struct | m_Intrinsic_Ty< T0 > |
struct | m_Intrinsic_Ty< T0, T1 > |
struct | m_Intrinsic_Ty< T0, T1, T2 > |
struct | m_Intrinsic_Ty< T0, T1, T2, T3 > |
Functions | |
template<typename Val , typename Pattern > | |
bool | match (Val *V, const Pattern &P) |
template<typename T > | |
OneUse_match< T > | m_OneUse (const T &SubPattern) |
class_match< Value > | m_Value () |
m_Value() - Match an arbitrary value and ignore it. | |
class_match< ConstantInt > | m_ConstantInt () |
m_ConstantInt() - Match an arbitrary ConstantInt and ignore it. | |
class_match< UndefValue > | m_Undef () |
m_Undef() - Match an arbitrary undef constant. | |
class_match< Constant > | m_Constant () |
template<typename LTy , typename RTy > | |
match_combine_or< LTy, RTy > | m_CombineOr (const LTy &L, const RTy &R) |
Combine two pattern matchers matching L || R. | |
template<typename LTy , typename RTy > | |
match_combine_and< LTy, RTy > | m_CombineAnd (const LTy &L, const RTy &R) |
Combine two pattern matchers matching L && R. | |
match_zero | m_Zero () |
match_neg_zero | m_NegZero () |
match_combine_or< match_zero, match_neg_zero > | m_AnyZero () |
apint_match | m_APInt (const APInt *&Res) |
cst_pred_ty< is_one > | m_One () |
m_One() - Match an integer 1 or a vector with all elements equal to 1. | |
api_pred_ty< is_one > | m_One (const APInt *&V) |
cst_pred_ty< is_all_ones > | m_AllOnes () |
m_AllOnes() - Match an integer or vector with all bits set to true. | |
api_pred_ty< is_all_ones > | m_AllOnes (const APInt *&V) |
cst_pred_ty< is_sign_bit > | m_SignBit () |
m_SignBit() - Match an integer or vector with only the sign bit(s) set. | |
api_pred_ty< is_sign_bit > | m_SignBit (const APInt *&V) |
cst_pred_ty< is_power2 > | m_Power2 () |
m_Power2() - Match an integer or vector power of 2. | |
api_pred_ty< is_power2 > | m_Power2 (const APInt *&V) |
bind_ty< Value > | m_Value (Value *&V) |
m_Value - Match a value, capturing it if we match. | |
bind_ty< ConstantInt > | m_ConstantInt (ConstantInt *&CI) |
m_ConstantInt - Match a ConstantInt, capturing the value if we match. | |
bind_ty< Constant > | m_Constant (Constant *&C) |
m_Constant - Match a Constant, capturing the value if we match. | |
bind_ty< ConstantFP > | m_ConstantFP (ConstantFP *&C) |
m_ConstantFP - Match a ConstantFP, capturing the value if we match. | |
specificval_ty | m_Specific (const Value *V) |
m_Specific - Match if we have a specific specified value. | |
specific_fpval | m_SpecificFP (double V) |
specific_fpval | m_FPOne () |
Match a float 1.0 or vector with all elements equal to 1.0. | |
specific_intval | m_SpecificInt (uint64_t V) |
bind_const_intval_ty | m_ConstantInt (uint64_t &V) |
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::FAdd > | m_FAdd (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::FSub > | m_FSub (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::FMul > | m_FMul (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 > | |
OverflowingBinaryOp_match< LHS, RHS, Instruction::Add, OverflowingBinaryOperator::NoSignedWrap > | m_NSWAdd (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
OverflowingBinaryOp_match< LHS, RHS, Instruction::Sub, OverflowingBinaryOperator::NoSignedWrap > | m_NSWSub (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
OverflowingBinaryOp_match< LHS, RHS, Instruction::Mul, OverflowingBinaryOperator::NoSignedWrap > | m_NSWMul (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
OverflowingBinaryOp_match< LHS, RHS, Instruction::Shl, OverflowingBinaryOperator::NoSignedWrap > | m_NSWShl (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
OverflowingBinaryOp_match< LHS, RHS, Instruction::Add, OverflowingBinaryOperator::NoUnsignedWrap > | m_NUWAdd (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
OverflowingBinaryOp_match< LHS, RHS, Instruction::Sub, OverflowingBinaryOperator::NoUnsignedWrap > | m_NUWSub (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
OverflowingBinaryOp_match< LHS, RHS, Instruction::Mul, OverflowingBinaryOperator::NoUnsignedWrap > | m_NUWMul (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
OverflowingBinaryOp_match< LHS, RHS, Instruction::Shl, OverflowingBinaryOperator::NoUnsignedWrap > | m_NUWShl (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
BinOp2_match< LHS, RHS, Instruction::LShr, Instruction::AShr > | m_Shr (const LHS &L, const RHS &R) |
m_Shr - Matches LShr or AShr. | |
template<typename LHS , typename RHS > | |
BinOp2_match< LHS, RHS, Instruction::LShr, Instruction::Shl > | m_LogicalShift (const LHS &L, const RHS &R) |
m_LogicalShift - Matches LShr or Shl. | |
template<typename LHS , typename RHS > | |
BinOp2_match< LHS, RHS, Instruction::SDiv, Instruction::UDiv > | m_IDiv (const LHS &L, const RHS &R) |
m_IDiv - Matches UDiv and SDiv. | |
template<typename T > | |
Exact_match< T > | m_Exact (const T &SubPattern) |
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, LHS, RHS > | m_Select (const Cond &C, const LHS &L, const RHS &R) |
template<int64_t L, int64_t R, typename Cond > | |
SelectClass_match< Cond, constantint_match< L > , constantint_match< R > > | m_SelectCst (const Cond &C) |
template<typename OpTy > | |
CastClass_match< OpTy, Instruction::BitCast > | m_BitCast (const OpTy &Op) |
m_BitCast | |
template<typename OpTy > | |
CastClass_match< OpTy, Instruction::PtrToInt > | m_PtrToInt (const OpTy &Op) |
m_PtrToInt | |
template<typename OpTy > | |
CastClass_match< OpTy, Instruction::Trunc > | m_Trunc (const OpTy &Op) |
m_Trunc | |
template<typename OpTy > | |
CastClass_match< OpTy, Instruction::SExt > | m_SExt (const OpTy &Op) |
m_SExt | |
template<typename OpTy > | |
CastClass_match< OpTy, Instruction::ZExt > | m_ZExt (const OpTy &Op) |
m_ZExt | |
template<typename OpTy > | |
CastClass_match< OpTy, Instruction::UIToFP > | m_UIToFP (const OpTy &Op) |
m_UIToFP | |
template<typename OpTy > | |
CastClass_match< OpTy, Instruction::SIToFP > | m_SIToFP (const OpTy &Op) |
m_SIToFP | |
template<typename LHS > | |
not_match< LHS > | m_Not (const LHS &L) |
template<typename LHS > | |
neg_match< LHS > | m_Neg (const LHS &L) |
m_Neg - Match an integer negate. | |
template<typename LHS > | |
fneg_match< LHS > | m_FNeg (const LHS &L) |
m_FNeg - Match a floating point negate. | |
br_match | m_UnconditionalBr (BasicBlock *&Succ) |
template<typename Cond_t > | |
brc_match< Cond_t > | m_Br (const Cond_t &C, BasicBlock *&T, BasicBlock *&F) |
template<typename LHS , typename RHS > | |
MaxMin_match< ICmpInst, LHS, RHS, smax_pred_ty > | m_SMax (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
MaxMin_match< ICmpInst, LHS, RHS, smin_pred_ty > | m_SMin (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
MaxMin_match< ICmpInst, LHS, RHS, umax_pred_ty > | m_UMax (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
MaxMin_match< ICmpInst, LHS, RHS, umin_pred_ty > | m_UMin (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
MaxMin_match< FCmpInst, LHS, RHS, ofmax_pred_ty > | m_OrdFMax (const LHS &L, const RHS &R) |
Match an 'ordered' floating point maximum function. Floating point has one special value 'NaN'. Therefore, there is no total order. However, if we can ignore the 'NaN' value (for example, because of a 'no-nans-float-math' flag) a combination of a fcmp and select has 'maximum' semantics. In the presence of 'NaN' we have to preserve the original select(fcmp(ogt/ge, L, R), L, R) semantics matched by this predicate. | |
template<typename LHS , typename RHS > | |
MaxMin_match< FCmpInst, LHS, RHS, ofmin_pred_ty > | m_OrdFMin (const LHS &L, const RHS &R) |
Match an 'ordered' floating point minimum function. Floating point has one special value 'NaN'. Therefore, there is no total order. However, if we can ignore the 'NaN' value (for example, because of a 'no-nans-float-math' flag) a combination of a fcmp and select has 'minimum' semantics. In the presence of 'NaN' we have to preserve the original select(fcmp(olt/le, L, R), L, R) semantics matched by this predicate. | |
template<typename LHS , typename RHS > | |
MaxMin_match< FCmpInst, LHS, RHS, ufmax_pred_ty > | m_UnordFMax (const LHS &L, const RHS &R) |
Match an 'unordered' floating point maximum function. Floating point has one special value 'NaN'. Therefore, there is no total order. However, if we can ignore the 'NaN' value (for example, because of a 'no-nans-float-math' flag) a combination of a fcmp and select has 'maximum' semantics. In the presence of 'NaN' we have to preserve the original select(fcmp(ugt/ge, L, R), L, R) semantics matched by this predicate. | |
template<typename LHS , typename RHS > | |
MaxMin_match< FCmpInst, LHS, RHS, ufmin_pred_ty > | m_UnordFMin (const LHS &L, const RHS &R) |
Match an 'unordered' floating point minimum function. Floating point has one special value 'NaN'. Therefore, there is no total order. However, if we can ignore the 'NaN' value (for example, because of a 'no-nans-float-math' flag) a combination of a fcmp and select has 'minimum' semantics. In the presence of 'NaN' we have to preserve the original select(fcmp(ult/le, L, R), L, R) semantics matched by this predicate. | |
template<unsigned OpI, typename Opnd_t > | |
Argument_match< Opnd_t > | m_Argument (const Opnd_t &Op) |
Match an argument. | |
template<Intrinsic::ID IntrID> | |
IntrinsicID_match | m_Intrinsic () |
template<Intrinsic::ID IntrID, typename T0 > | |
m_Intrinsic_Ty< T0 >::Ty | m_Intrinsic (const T0 &Op0) |
template<Intrinsic::ID IntrID, typename T0 , typename T1 > | |
m_Intrinsic_Ty< T0, T1 >::Ty | m_Intrinsic (const T0 &Op0, const T1 &Op1) |
template<Intrinsic::ID IntrID, typename T0 , typename T1 , typename T2 > | |
m_Intrinsic_Ty< T0, T1, T2 >::Ty | m_Intrinsic (const T0 &Op0, const T1 &Op1, const T2 &Op2) |
template<Intrinsic::ID IntrID, typename T0 , typename T1 , typename T2 , typename T3 > | |
m_Intrinsic_Ty< T0, T1, T2, T3 > ::Ty | m_Intrinsic (const T0 &Op0, const T1 &Op1, const T2 &Op2, const T3 &Op3) |
template<typename Opnd0 > | |
m_Intrinsic_Ty< Opnd0 >::Ty | m_BSwap (const Opnd0 &Op0) |
BinaryOp_match<LHS, RHS, Instruction::Add> llvm::PatternMatch::m_Add | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 418 of file PatternMatch.h.
Referenced by checkForNegativeOperand(), FindScalarElement(), llvm::InstCombiner::FoldOrOfICmps(), GatherConstantCompares(), getValueFromFromCondition(), isKnownNonZero(), isKnownToBeAPowerOfTwo(), SimplifyAndOfICmps(), SimplifyOrInst(), SimplifyOrOfICmps(), SimplifySubInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitMul(), and llvm::InstCombiner::visitSub().
cst_pred_ty<is_all_ones> llvm::PatternMatch::m_AllOnes | ( | ) | [inline] |
m_AllOnes() - Match an integer or vector with all bits set to true.
Definition at line 265 of file PatternMatch.h.
Referenced by SimplifyAndInst(), SimplifyAShrInst(), SimplifyOrInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitSDiv(), and llvm::InstCombiner::visitSub().
api_pred_ty<is_all_ones> llvm::PatternMatch::m_AllOnes | ( | const APInt *& | V | ) | [inline] |
Definition at line 266 of file PatternMatch.h.
BinaryOp_match<LHS, RHS, Instruction::And> llvm::PatternMatch::m_And | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 490 of file PatternMatch.h.
Referenced by checkForNegativeOperand(), llvm::InstCombiner::FoldAndOfICmps(), foldLogOpOfMaskedICmpsHelper(), llvm::InstCombiner::FoldOrWithConstants(), foldSelectICmpAnd(), foldSelectICmpAndOr(), llvm::InstCombiner::FoldShiftByConstant(), llvm::InstCombiner::FoldXorWithConstants(), GatherConstantCompares(), isKnownToBeAPowerOfTwo(), m_c_And(), ProcessUMulZExtIdiom(), SimplifyICmpInst(), SimplifyOrInst(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitSub(), llvm::InstCombiner::visitTrunc(), llvm::InstCombiner::visitXor(), and llvm::InstCombiner::visitZExt().
match_combine_or<match_zero, match_neg_zero> llvm::PatternMatch::m_AnyZero | ( | ) | [inline] |
m_AnyZero() - Match an arbitrary zero/null constant. This includes zero_initializer for vectors and ConstantPointerNull for pointers. For floating point constants, this will match negative zero and positive zero
Definition at line 157 of file PatternMatch.h.
References m_CombineOr(), m_NegZero(), and m_Zero().
Referenced by SimplifyFAddInst(), SimplifyFMulInst(), SimplifyFSubInst(), and llvm::InstCombiner::visitFAdd().
apint_match llvm::PatternMatch::m_APInt | ( | const APInt *& | Res | ) | [inline] |
m_APInt - Match a ConstantInt or splatted ConstantVector, binding the specified pointer to the contained APInt.
Definition at line 183 of file PatternMatch.h.
Referenced by checkForNegativeOperand(), llvm::InstCombiner::commonIDivTransforms(), ComputeNumSignBits(), foldSelectICmpAndOr(), getLogBase2Vector(), SimplifyICmpInst(), and llvm::InstCombiner::visitMul().
Argument_match<Opnd_t> llvm::PatternMatch::m_Argument | ( | const Opnd_t & | Op | ) | [inline] |
Match an argument.
Definition at line 1150 of file PatternMatch.h.
BinaryOp_match<LHS, RHS, Instruction::AShr> llvm::PatternMatch::m_AShr | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 520 of file PatternMatch.h.
Referenced by computeKnownBitsFromAssume(), SimplifyGEPInst(), SimplifyICmpInst(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitSExt(), and llvm::InstCombiner::visitSub().
CastClass_match<OpTy, Instruction::BitCast> llvm::PatternMatch::m_BitCast | ( | const OpTy & | Op | ) | [inline] |
m_BitCast
Definition at line 777 of file PatternMatch.h.
Referenced by computeKnownBitsFromAssume(), and OptimizeIntToFloatBitCast().
brc_match<Cond_t> llvm::PatternMatch::m_Br | ( | const Cond_t & | C, |
BasicBlock *& | T, | ||
BasicBlock *& | F | ||
) | [inline] |
Definition at line 950 of file PatternMatch.h.
References llvm::CallingConv::C, F(), and T.
Referenced by tryToMoveFreeBeforeNullTest(), and llvm::InstCombiner::visitBranchInst().
m_Intrinsic_Ty<Opnd0>::Ty llvm::PatternMatch::m_BSwap | ( | const Opnd0 & | Op0 | ) | [inline] |
Definition at line 1227 of file PatternMatch.h.
Referenced by llvm::InstCombiner::visitCallInst().
match_combine_and<LTy, RTy> llvm::PatternMatch::m_CombineAnd | ( | const LTy & | L, |
const RTy & | R | ||
) | [inline] |
Combine two pattern matchers matching L && R.
Definition at line 122 of file PatternMatch.h.
Referenced by m_Intrinsic().
match_combine_or<LTy, RTy> llvm::PatternMatch::m_CombineOr | ( | const LTy & | L, |
const RTy & | R | ||
) | [inline] |
Combine two pattern matchers matching L || R.
Definition at line 116 of file PatternMatch.h.
Referenced by computeKnownBitsFromAssume(), m_AnyZero(), m_c_And(), m_c_ICmp(), m_c_Or(), and m_c_Xor().
class_match<Constant> llvm::PatternMatch::m_Constant | ( | ) | [inline] |
Definition at line 78 of file PatternMatch.h.
Referenced by FindScalarElement(), llvm::InstCombiner::visitFDiv(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitShl(), llvm::InstCombiner::visitSub(), llvm::InstCombiner::visitUDiv(), and llvm::InstCombiner::visitZExt().
bind_ty<Constant> llvm::PatternMatch::m_Constant | ( | Constant *& | C | ) | [inline] |
m_Constant - Match a Constant, capturing the value if we match.
Definition at line 306 of file PatternMatch.h.
References llvm::CallingConv::C.
bind_ty<ConstantFP> llvm::PatternMatch::m_ConstantFP | ( | ConstantFP *& | C | ) | [inline] |
m_ConstantFP - Match a ConstantFP, capturing the value if we match.
Definition at line 309 of file PatternMatch.h.
References llvm::CallingConv::C.
constantint_match< 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.
Definition at line 72 of file PatternMatch.h.
Referenced by CanEvaluateShifted(), computeKnownBitsFromAssume(), llvm::InstCombiner::FoldAndOfICmps(), llvm::InstCombiner::FoldOrOfICmps(), llvm::InstCombiner::FoldOrWithConstants(), foldSelectICmpAnd(), llvm::InstCombiner::FoldShiftByConstant(), llvm::InstCombiner::FoldXorWithConstants(), GatherConstantCompares(), getValueFromFromCondition(), OptimizeIntToFloatBitCast(), ProcessUMulZExtIdiom(), SimplifyAndOfICmps(), SimplifyGEPInst(), SimplifyICmpInst(), SimplifyOrOfICmps(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitSExt(), llvm::InstCombiner::visitSub(), and llvm::InstCombiner::visitTrunc().
bind_ty<ConstantInt> llvm::PatternMatch::m_ConstantInt | ( | ConstantInt *& | CI | ) | [inline] |
m_ConstantInt - Match a ConstantInt, capturing the value if we match.
Definition at line 303 of file PatternMatch.h.
bind_const_intval_ty llvm::PatternMatch::m_ConstantInt | ( | uint64_t & | V | ) | [inline] |
m_ConstantInt - Match a ConstantInt and bind to its value. This does not match ConstantInts wider than 64-bits.
Definition at line 390 of file PatternMatch.h.
Exact_match<T> llvm::PatternMatch::m_Exact | ( | const T & | SubPattern | ) | [inline] |
Definition at line 677 of file PatternMatch.h.
Referenced by isKnownNonZero(), isKnownToBeAPowerOfTwo(), SimplifyMulInst(), and SimplifyShlInst().
BinaryOp_match<LHS, RHS, Instruction::FAdd> llvm::PatternMatch::m_FAdd | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 424 of file PatternMatch.h.
CmpClass_match<LHS, RHS, FCmpInst, FCmpInst::Predicate> llvm::PatternMatch::m_FCmp | ( | FCmpInst::Predicate & | Pred, |
const LHS & | L, | ||
const RHS & | R | ||
) | [inline] |
Definition at line 712 of file PatternMatch.h.
Referenced by llvm::InstCombiner::visitBranchInst().
BinaryOp_match<LHS, RHS, Instruction::FDiv> llvm::PatternMatch::m_FDiv | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 466 of file PatternMatch.h.
Referenced by llvm::InstCombiner::visitFDiv().
BinaryOp_match<LHS, RHS, Instruction::FMul> llvm::PatternMatch::m_FMul | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 448 of file PatternMatch.h.
Referenced by llvm::InstCombiner::visitFDiv(), and llvm::InstCombiner::visitFMul().
fneg_match<LHS> llvm::PatternMatch::m_FNeg | ( | const LHS & | L | ) | [inline] |
m_FNeg - Match a floating point negate.
Definition at line 903 of file PatternMatch.h.
Referenced by llvm::InstCombiner::visitFCmpInst().
specific_fpval llvm::PatternMatch::m_FPOne | ( | ) | [inline] |
Match a float 1.0 or vector with all elements equal to 1.0.
Definition at line 348 of file PatternMatch.h.
References m_SpecificFP().
Referenced by SimplifyFMulInst().
BinaryOp_match<LHS, RHS, Instruction::FRem> llvm::PatternMatch::m_FRem | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 484 of file PatternMatch.h.
BinaryOp_match<LHS, RHS, Instruction::FSub> llvm::PatternMatch::m_FSub | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 436 of file PatternMatch.h.
Referenced by SimplifyFAddInst(), and SimplifyFSubInst().
CmpClass_match<LHS, RHS, ICmpInst, ICmpInst::Predicate> llvm::PatternMatch::m_ICmp | ( | ICmpInst::Predicate & | Pred, |
const LHS & | L, | ||
const RHS & | R | ||
) | [inline] |
Definition at line 705 of file PatternMatch.h.
Referenced by computeKnownBitsFromAssume(), m_c_ICmp(), SimplifyAndOfICmps(), SimplifyOrOfICmps(), tryToMoveFreeBeforeNullTest(), and llvm::InstCombiner::visitBranchInst().
BinOp2_match<LHS, RHS, Instruction::SDiv, Instruction::UDiv> llvm::PatternMatch::m_IDiv | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
m_IDiv - Matches UDiv and SDiv.
Definition at line 655 of file PatternMatch.h.
Referenced by isKnownNonZero(), and SimplifyMulInst().
IntrinsicID_match llvm::PatternMatch::m_Intrinsic | ( | ) | [inline] |
Match intrinsic calls like this: m_Intrinsic<Intrinsic::fabs>(m_Value(X))
Definition at line 1198 of file PatternMatch.h.
m_Intrinsic_Ty<T0>::Ty llvm::PatternMatch::m_Intrinsic | ( | const T0 & | Op0 | ) | [inline] |
Definition at line 1202 of file PatternMatch.h.
References m_CombineAnd().
m_Intrinsic_Ty<T0, T1>::Ty llvm::PatternMatch::m_Intrinsic | ( | const T0 & | Op0, |
const T1 & | Op1 | ||
) | [inline] |
Definition at line 1208 of file PatternMatch.h.
References m_CombineAnd().
m_Intrinsic_Ty<T0, T1, T2>::Ty llvm::PatternMatch::m_Intrinsic | ( | const T0 & | Op0, |
const T1 & | Op1, | ||
const T2 & | Op2 | ||
) | [inline] |
Definition at line 1214 of file PatternMatch.h.
References m_CombineAnd().
m_Intrinsic_Ty<T0, T1, T2, T3>::Ty llvm::PatternMatch::m_Intrinsic | ( | const T0 & | Op0, |
const T1 & | Op1, | ||
const T2 & | Op2, | ||
const T3 & | Op3 | ||
) | [inline] |
Definition at line 1220 of file PatternMatch.h.
References m_CombineAnd().
BinOp2_match<LHS, RHS, Instruction::LShr, Instruction::Shl> llvm::PatternMatch::m_LogicalShift | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
m_LogicalShift - Matches LShr or Shl.
Definition at line 648 of file PatternMatch.h.
Referenced by llvm::InstCombiner::visitOr().
BinaryOp_match<LHS, RHS, Instruction::LShr> llvm::PatternMatch::m_LShr | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 514 of file PatternMatch.h.
Referenced by CanEvaluateShifted(), computeKnownBitsFromAssume(), isKnownToBeAPowerOfTwo(), OptimizeIntToFloatBitCast(), SimplifyICmpInst(), simplifyValueKnownNonZero(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitICmpInstWithInstAndIntCst(), llvm::InstCombiner::visitSub(), llvm::InstCombiner::visitTrunc(), and llvm::InstCombiner::visitUDiv().
BinaryOp_match<LHS, RHS, Instruction::Mul> llvm::PatternMatch::m_Mul | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 442 of file PatternMatch.h.
Referenced by isKnownNonZero(), SimplifyDiv(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitMul(), and llvm::InstCombiner::visitSub().
neg_match<LHS> llvm::PatternMatch::m_Neg | ( | const LHS & | L | ) | [inline] |
m_Neg - Match an integer negate.
Definition at line 877 of file PatternMatch.h.
Referenced by isKnownToBeAPowerOfTwo(), MatchSelectPattern(), SimplifyAndInst(), SimplifyICmpInst(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitICmpInst(), and llvm::InstCombiner::visitSub().
match_neg_zero llvm::PatternMatch::m_NegZero | ( | ) | [inline] |
m_NegZero() - Match an arbitrary zero/null constant. This includes zero_initializer for vectors and ConstantPointerNull for pointers. For floating point constants, this will match negative zero but not positive zero
Definition at line 152 of file PatternMatch.h.
Referenced by m_AnyZero(), SimplifyFAddInst(), and SimplifyFSubInst().
not_match<LHS> llvm::PatternMatch::m_Not | ( | const LHS & | L | ) | [inline] |
Definition at line 851 of file PatternMatch.h.
Referenced by computeKnownBitsFromAssume(), MatchSelectFromAndOr(), SimplifyAddInst(), SimplifyAndInst(), SimplifyOrInst(), SimplifyXorInst(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitBranchInst(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitSelectInst(), llvm::InstCombiner::visitSub(), llvm::InstCombiner::visitXor(), and llvm::InstCombiner::visitZExt().
OverflowingBinaryOp_match<LHS, RHS, Instruction::Add, OverflowingBinaryOperator::NoSignedWrap> llvm::PatternMatch::m_NSWAdd | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 551 of file PatternMatch.h.
References llvm::OverflowingBinaryOperator::NoSignedWrap.
OverflowingBinaryOp_match<LHS, RHS, Instruction::Mul, OverflowingBinaryOperator::NoSignedWrap> llvm::PatternMatch::m_NSWMul | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 567 of file PatternMatch.h.
References llvm::OverflowingBinaryOperator::NoSignedWrap.
Referenced by llvm::InstCombiner::commonIDivTransforms().
OverflowingBinaryOp_match<LHS, RHS, Instruction::Shl, OverflowingBinaryOperator::NoSignedWrap> llvm::PatternMatch::m_NSWShl | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 575 of file PatternMatch.h.
References llvm::OverflowingBinaryOperator::NoSignedWrap.
Referenced by llvm::InstCombiner::commonIDivTransforms(), and SimplifyICmpInst().
OverflowingBinaryOp_match<LHS, RHS, Instruction::Sub, OverflowingBinaryOperator::NoSignedWrap> llvm::PatternMatch::m_NSWSub | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 559 of file PatternMatch.h.
References llvm::OverflowingBinaryOperator::NoSignedWrap.
OverflowingBinaryOp_match<LHS, RHS, Instruction::Add, OverflowingBinaryOperator::NoUnsignedWrap> llvm::PatternMatch::m_NUWAdd | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 584 of file PatternMatch.h.
References llvm::OverflowingBinaryOperator::NoUnsignedWrap.
OverflowingBinaryOp_match<LHS, RHS, Instruction::Mul, OverflowingBinaryOperator::NoUnsignedWrap> llvm::PatternMatch::m_NUWMul | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 600 of file PatternMatch.h.
References llvm::OverflowingBinaryOperator::NoUnsignedWrap.
Referenced by llvm::InstCombiner::commonIDivTransforms().
OverflowingBinaryOp_match<LHS, RHS, Instruction::Shl, OverflowingBinaryOperator::NoUnsignedWrap> llvm::PatternMatch::m_NUWShl | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 608 of file PatternMatch.h.
References llvm::OverflowingBinaryOperator::NoUnsignedWrap.
Referenced by llvm::InstCombiner::commonIDivTransforms(), and SimplifyICmpInst().
OverflowingBinaryOp_match<LHS, RHS, Instruction::Sub, OverflowingBinaryOperator::NoUnsignedWrap> llvm::PatternMatch::m_NUWSub | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 592 of file PatternMatch.h.
References llvm::OverflowingBinaryOperator::NoUnsignedWrap.
cst_pred_ty<is_one> llvm::PatternMatch::m_One | ( | ) | [inline] |
m_One() - Match an integer 1 or a vector with all elements equal to 1.
Definition at line 257 of file PatternMatch.h.
Referenced by checkForNegativeOperand(), isKnownToBeAPowerOfTwo(), SimplifyDiv(), SimplifyICmpInst(), SimplifyMulInst(), SimplifyRem(), ThreadCmpOverSelect(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitICmpInstWithInstAndIntCst(), llvm::InstCombiner::visitMul(), and llvm::InstCombiner::visitURem().
api_pred_ty<is_one> llvm::PatternMatch::m_One | ( | const APInt *& | V | ) | [inline] |
Definition at line 258 of file PatternMatch.h.
OneUse_match<T> llvm::PatternMatch::m_OneUse | ( | const T & | SubPattern | ) | [inline] |
Definition at line 60 of file PatternMatch.h.
Referenced by llvm::InstCombiner::FoldShiftByConstant(), simplifyValueKnownNonZero(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitShl(), and llvm::InstCombiner::visitZExt().
BinaryOp_match<LHS, RHS, Instruction::Or> llvm::PatternMatch::m_Or | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 496 of file PatternMatch.h.
Referenced by checkForNegativeOperand(), foldSelectICmpAndOr(), isKnownNonZero(), m_c_Or(), SimplifyAndInst(), SimplifyICmpInst(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitICmpInstWithInstAndIntCst(), llvm::InstCombiner::visitOr(), and llvm::InstCombiner::visitXor().
MaxMin_match<FCmpInst, LHS, RHS, ofmax_pred_ty> llvm::PatternMatch::m_OrdFMax | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Match an 'ordered' floating point maximum function. Floating point has one special value 'NaN'. Therefore, there is no total order. However, if we can ignore the 'NaN' value (for example, because of a 'no-nans-float-math' flag) a combination of a fcmp and select has 'maximum' semantics. In the presence of 'NaN' we have to preserve the original select(fcmp(ogt/ge, L, R), L, R) semantics matched by this predicate.
max(L, R) iff L and R are not NaN m_OrdFMax(L, R) = R iff L or R are NaN
Definition at line 1086 of file PatternMatch.h.
MaxMin_match<FCmpInst, LHS, RHS, ofmin_pred_ty> llvm::PatternMatch::m_OrdFMin | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Match an 'ordered' floating point minimum function. Floating point has one special value 'NaN'. Therefore, there is no total order. However, if we can ignore the 'NaN' value (for example, because of a 'no-nans-float-math' flag) a combination of a fcmp and select has 'minimum' semantics. In the presence of 'NaN' we have to preserve the original select(fcmp(olt/le, L, R), L, R) semantics matched by this predicate.
max(L, R) iff L and R are not NaN m_OrdFMin(L, R) = R iff L or R are NaN
Definition at line 1101 of file PatternMatch.h.
cst_pred_ty<is_power2> llvm::PatternMatch::m_Power2 | ( | ) | [inline] |
m_Power2() - Match an integer or vector power of 2.
Definition at line 281 of file PatternMatch.h.
Referenced by llvm::InstCombiner::commonShiftTransforms(), foldSelectICmpAndOr(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitSDiv(), and visitUDivOperand().
api_pred_ty<is_power2> llvm::PatternMatch::m_Power2 | ( | const APInt *& | V | ) | [inline] |
Definition at line 282 of file PatternMatch.h.
CastClass_match<OpTy, Instruction::PtrToInt> llvm::PatternMatch::m_PtrToInt | ( | const OpTy & | Op | ) | [inline] |
m_PtrToInt
Definition at line 784 of file PatternMatch.h.
Referenced by computeKnownBitsFromAssume(), SimplifyGEPInst(), SimplifySubInst(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitICmpInstWithInstAndIntCst(), and llvm::InstCombiner::visitSub().
BinaryOp_match<LHS, RHS, Instruction::SDiv> llvm::PatternMatch::m_SDiv | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 460 of file PatternMatch.h.
Referenced by SimplifyGEPInst(), SimplifyICmpInst(), llvm::InstCombiner::visitGetElementPtrInst(), and llvm::InstCombiner::visitSub().
SelectClass_match<Cond, LHS, RHS> llvm::PatternMatch::m_Select | ( | const Cond & | C, |
const LHS & | L, | ||
const RHS & | R | ||
) | [inline] |
Definition at line 743 of file PatternMatch.h.
References llvm::CallingConv::C.
Referenced by m_SelectCst(), llvm::InstCombiner::visitFAdd(), llvm::InstCombiner::visitICmpInst(), and llvm::InstCombiner::visitOr().
SelectClass_match<Cond, constantint_match<L>, constantint_match<R> > llvm::PatternMatch::m_SelectCst | ( | const Cond & | C | ) | [inline] |
m_SelectCst - This matches a select of two constants, e.g.: m_SelectCst<-1, 0>(m_Value(V))
Definition at line 751 of file PatternMatch.h.
References m_Select().
CastClass_match<OpTy, Instruction::SExt> llvm::PatternMatch::m_SExt | ( | const OpTy & | Op | ) | [inline] |
m_SExt
Definition at line 798 of file PatternMatch.h.
Referenced by MatchSelectFromAndOr(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitSelectInstWithICmp(), and llvm::InstCombiner::visitSub().
BinaryOp_match<LHS, RHS, Instruction::Shl> llvm::PatternMatch::m_Shl | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 508 of file PatternMatch.h.
Referenced by CanEvaluateShifted(), computeKnownBitsFromAssume(), isKnownNonZero(), isKnownToBeAPowerOfTwo(), SimplifyAShrInst(), SimplifyICmpInst(), SimplifyLShrInst(), simplifyValueKnownNonZero(), llvm::InstCombiner::visitAShr(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitICmpInstWithInstAndIntCst(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitSDiv(), llvm::InstCombiner::visitSExt(), llvm::InstCombiner::visitShl(), llvm::InstCombiner::visitSub(), and visitUDivOperand().
BinOp2_match<LHS, RHS, Instruction::LShr, Instruction::AShr> llvm::PatternMatch::m_Shr | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
m_Shr - Matches LShr or AShr.
Definition at line 641 of file PatternMatch.h.
Referenced by llvm::InstCombiner::FoldShiftByConstant(), isKnownNonZero(), isKnownToBeAPowerOfTwo(), and SimplifyShlInst().
cst_pred_ty<is_sign_bit> llvm::PatternMatch::m_SignBit | ( | ) | [inline] |
m_SignBit() - Match an integer or vector with only the sign bit(s) set.
Definition at line 273 of file PatternMatch.h.
Referenced by isKnownToBeAPowerOfTwo().
api_pred_ty<is_sign_bit> llvm::PatternMatch::m_SignBit | ( | const APInt *& | V | ) | [inline] |
Definition at line 274 of file PatternMatch.h.
CastClass_match<OpTy, Instruction::SIToFP> llvm::PatternMatch::m_SIToFP | ( | const OpTy & | Op | ) | [inline] |
m_SIToFP
Definition at line 819 of file PatternMatch.h.
MaxMin_match<ICmpInst, LHS, RHS, smax_pred_ty> llvm::PatternMatch::m_SMax | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 1053 of file PatternMatch.h.
Referenced by SimplifyICmpInst().
MaxMin_match<ICmpInst, LHS, RHS, smin_pred_ty> llvm::PatternMatch::m_SMin | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 1059 of file PatternMatch.h.
Referenced by SimplifyICmpInst().
specificval_ty llvm::PatternMatch::m_Specific | ( | const Value * | V | ) | [inline] |
m_Specific - Match if we have a specific specified value.
Definition at line 323 of file PatternMatch.h.
Referenced by llvm::InstCombiner::commonIDivTransforms(), computeKnownBitsFromAssume(), llvm::InstCombiner::FoldAndOfICmps(), llvm::InstCombiner::FoldOrOfICmps(), foldSelectICmpAndOr(), llvm::InstCombiner::FoldShiftByConstant(), getValueFromFromCondition(), isKnownToBeAPowerOfTwo(), MatchSelectFromAndOr(), MatchSelectPattern(), SimplifyAddInst(), SimplifyAndInst(), SimplifyAndOfICmps(), SimplifyAShrInst(), SimplifyDiv(), SimplifyFAddInst(), SimplifyGEPInst(), SimplifyICmpInst(), SimplifyLShrInst(), SimplifyMulInst(), SimplifyOrInst(), SimplifyOrOfICmps(), SimplifyRem(), SimplifyShlInst(), SimplifyXorInst(), tryToMoveFreeBeforeNullTest(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitAShr(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitICmpInstWithInstAndIntCst(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitSelectInst(), llvm::InstCombiner::visitSelectInstWithICmp(), llvm::InstCombiner::visitSub(), llvm::InstCombiner::visitXor(), and llvm::InstCombiner::visitZExt().
specific_fpval llvm::PatternMatch::m_SpecificFP | ( | double | V | ) | [inline] |
Match a specific floating point value or vector with all elements equal to the value.
Definition at line 345 of file PatternMatch.h.
Referenced by detectLog2OfHalf(), m_FPOne(), and llvm::InstCombiner::visitFMul().
specific_intval llvm::PatternMatch::m_SpecificInt | ( | uint64_t | V | ) | [inline] |
Match a specific integer value or vector with all elements equal to the value.
Definition at line 386 of file PatternMatch.h.
Referenced by SimplifyGEPInst().
BinaryOp_match<LHS, RHS, Instruction::SRem> llvm::PatternMatch::m_SRem | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 478 of file PatternMatch.h.
Referenced by llvm::InstCombiner::commonIDivTransforms(), llvm::InstCombiner::commonShiftTransforms(), SimplifyDiv(), SimplifyICmpInst(), and SimplifyRem().
BinaryOp_match<LHS, RHS, Instruction::Sub> llvm::PatternMatch::m_Sub | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 430 of file PatternMatch.h.
Referenced by llvm::InstCombiner::commonIDivTransforms(), SimplifyAddInst(), SimplifyGEPInst(), SimplifySubInst(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitMul(), and llvm::InstCombiner::visitSub().
CastClass_match<OpTy, Instruction::Trunc> llvm::PatternMatch::m_Trunc | ( | const OpTy & | Op | ) | [inline] |
m_Trunc
Definition at line 791 of file PatternMatch.h.
Referenced by llvm::InstCombiner::FoldAndOfICmps(), OptimizeIntToFloatBitCast(), SimplifySubInst(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitSExt(), llvm::InstCombiner::visitSub(), and llvm::InstCombiner::visitZExt().
BinaryOp_match<LHS, RHS, Instruction::UDiv> llvm::PatternMatch::m_UDiv | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 454 of file PatternMatch.h.
Referenced by isKnownToBeAPowerOfTwo(), and SimplifyICmpInst().
CastClass_match<OpTy, Instruction::UIToFP> llvm::PatternMatch::m_UIToFP | ( | const OpTy & | Op | ) | [inline] |
m_UIToFP
Definition at line 812 of file PatternMatch.h.
MaxMin_match<ICmpInst, LHS, RHS, umax_pred_ty> llvm::PatternMatch::m_UMax | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 1065 of file PatternMatch.h.
Referenced by SimplifyICmpInst().
MaxMin_match<ICmpInst, LHS, RHS, umin_pred_ty> llvm::PatternMatch::m_UMin | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 1071 of file PatternMatch.h.
Referenced by SimplifyICmpInst().
br_match llvm::PatternMatch::m_UnconditionalBr | ( | BasicBlock *& | Succ | ) | [inline] |
Definition at line 927 of file PatternMatch.h.
Referenced by tryToMoveFreeBeforeNullTest().
class_match<UndefValue> llvm::PatternMatch::m_Undef | ( | ) | [inline] |
m_Undef() - Match an arbitrary undef constant.
Definition at line 76 of file PatternMatch.h.
Referenced by SimplifyAddInst(), SimplifyAndInst(), SimplifyAShrInst(), SimplifyDiv(), SimplifyFDivInst(), SimplifyFRemInst(), SimplifyInsertValueInst(), SimplifyLShrInst(), SimplifyMulInst(), SimplifyOrInst(), SimplifyRem(), SimplifyShlInst(), SimplifySubInst(), and SimplifyXorInst().
MaxMin_match<FCmpInst, LHS, RHS, ufmax_pred_ty> llvm::PatternMatch::m_UnordFMax | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Match an 'unordered' floating point maximum function. Floating point has one special value 'NaN'. Therefore, there is no total order. However, if we can ignore the 'NaN' value (for example, because of a 'no-nans-float-math' flag) a combination of a fcmp and select has 'maximum' semantics. In the presence of 'NaN' we have to preserve the original select(fcmp(ugt/ge, L, R), L, R) semantics matched by this predicate.
max(L, R) iff L and R are not NaN m_UnordFMin(L, R) = L iff L or R are NaN
Definition at line 1116 of file PatternMatch.h.
MaxMin_match<FCmpInst, LHS, RHS, ufmin_pred_ty> llvm::PatternMatch::m_UnordFMin | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Match an 'unordered' floating point minimum function. Floating point has one special value 'NaN'. Therefore, there is no total order. However, if we can ignore the 'NaN' value (for example, because of a 'no-nans-float-math' flag) a combination of a fcmp and select has 'minimum' semantics. In the presence of 'NaN' we have to preserve the original select(fcmp(ult/le, L, R), L, R) semantics matched by this predicate.
max(L, R) iff L and R are not NaN m_UnordFMin(L, R) = L iff L or R are NaN
Definition at line 1131 of file PatternMatch.h.
BinaryOp_match<LHS, RHS, Instruction::URem> llvm::PatternMatch::m_URem | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 472 of file PatternMatch.h.
Referenced by llvm::InstCombiner::commonIDivTransforms(), SimplifyDiv(), SimplifyICmpInst(), and SimplifyRem().
class_match<Value> llvm::PatternMatch::m_Value | ( | ) | [inline] |
m_Value() - Match an arbitrary value and ignore it.
Definition at line 70 of file PatternMatch.h.
Referenced by CanEvaluateShifted(), checkForNegativeOperand(), llvm::InstCombiner::commonIDivTransforms(), llvm::InstCombiner::commonShiftTransforms(), computeKnownBitsFromAssume(), FindScalarElement(), llvm::InstCombiner::FoldAndOfICmps(), foldLogOpOfMaskedICmpsHelper(), llvm::InstCombiner::FoldOrOfICmps(), llvm::InstCombiner::FoldOrWithConstants(), foldSelectICmpAnd(), foldSelectICmpAndOr(), llvm::InstCombiner::FoldShiftByConstant(), llvm::InstCombiner::FoldXorWithConstants(), GatherConstantCompares(), llvm::InstCombineIRInserter::InsertHelper(), isKnownNonZero(), isKnownToBeAPowerOfTwo(), MatchSelectFromAndOr(), OptimizeIntToFloatBitCast(), ProcessUMulZExtIdiom(), llvm::AssumptionTracker::registerAssumption(), SimplifyAddInst(), SimplifyAndInst(), SimplifyAndOfICmps(), SimplifyAShrInst(), SimplifyDiv(), SimplifyFSubInst(), SimplifyGEPInst(), SimplifyICmpInst(), SimplifyLShrInst(), SimplifyMulInst(), SimplifyOrInst(), SimplifyOrOfICmps(), SimplifyRem(), SimplifyShlInst(), SimplifySubInst(), simplifyValueKnownNonZero(), llvm::AssumptionTracker::verifyAnalysis(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitAShr(), llvm::InstCombiner::visitBranchInst(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitFAdd(), llvm::InstCombiner::visitFCmpInst(), llvm::InstCombiner::visitFDiv(), llvm::InstCombiner::visitFMul(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitICmpInstWithInstAndIntCst(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitSDiv(), llvm::InstCombiner::visitSExt(), llvm::InstCombiner::visitShl(), llvm::InstCombiner::visitSub(), llvm::InstCombiner::visitTrunc(), llvm::InstCombiner::visitUDiv(), visitUDivOperand(), llvm::InstCombiner::visitXor(), and llvm::InstCombiner::visitZExt().
bind_ty<Value> llvm::PatternMatch::m_Value | ( | Value *& | V | ) | [inline] |
m_Value - Match a value, capturing it if we match.
Definition at line 300 of file PatternMatch.h.
BinaryOp_match<LHS, RHS, Instruction::Xor> llvm::PatternMatch::m_Xor | ( | const LHS & | L, |
const RHS & | R | ||
) | [inline] |
Definition at line 502 of file PatternMatch.h.
Referenced by checkForNegativeOperand(), foldSelectICmpAndOr(), m_c_Xor(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitXor(), and llvm::InstCombiner::visitZExt().
match_zero llvm::PatternMatch::m_Zero | ( | ) | [inline] |
m_Zero() - Match an arbitrary zero/null constant. This includes zero_initializer for vectors and ConstantPointerNull for pointers.
Definition at line 137 of file PatternMatch.h.
Referenced by foldSelectICmpAnd(), foldSelectICmpAndOr(), getGEPInductionOperand(), m_AnyZero(), SimplifyAddInst(), SimplifyAndInst(), SimplifyDiv(), SimplifyFAddInst(), SimplifyFSubInst(), SimplifyGEPInst(), SimplifyICmpInst(), SimplifyMulInst(), SimplifyOrInst(), SimplifyRem(), SimplifyShift(), SimplifySubInst(), SimplifyXorInst(), ThreadCmpOverSelect(), tryToMoveFreeBeforeNullTest(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitSDiv(), and llvm::InstCombiner::visitSub().
CastClass_match<OpTy, Instruction::ZExt> llvm::PatternMatch::m_ZExt | ( | const OpTy & | Op | ) | [inline] |
m_ZExt
Definition at line 805 of file PatternMatch.h.
Referenced by SimplifyICmpInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitSelectInstWithICmp(), llvm::InstCombiner::visitSub(), llvm::InstCombiner::visitTrunc(), and visitUDivOperand().
bool llvm::PatternMatch::match | ( | Val * | V, |
const Pattern & | P | ||
) |
Definition at line 42 of file PatternMatch.h.
Referenced by CanEvaluateShifted(), checkForNegativeOperand(), llvm::InstCombiner::commonIDivTransforms(), llvm::InstCombiner::commonShiftTransforms(), computeKnownBitsFromAssume(), ComputeNumSignBits(), detectLog2OfHalf(), FindScalarElement(), llvm::InstCombiner::FoldAndOfICmps(), foldLogOpOfMaskedICmpsHelper(), llvm::InstCombiner::FoldOrOfICmps(), llvm::InstCombiner::FoldOrWithConstants(), foldSelectICmpAnd(), foldSelectICmpAndOr(), llvm::InstCombiner::FoldShiftByConstant(), llvm::InstCombiner::FoldXorWithConstants(), GatherConstantCompares(), getGEPInductionOperand(), getLogBase2Vector(), getValueFromFromCondition(), llvm::InstCombineIRInserter::InsertHelper(), isKnownNonZero(), isKnownToBeAPowerOfTwo(), llvm::PatternMatch::MaxMin_match< CmpInst_t, LHS_t, RHS_t, Pred_t >::match(), MatchSelectFromAndOr(), MatchSelectPattern(), OptimizeIntToFloatBitCast(), ProcessUMulZExtIdiom(), llvm::AssumptionTracker::registerAssumption(), SimplifyAddInst(), SimplifyAndInst(), SimplifyAndOfICmps(), SimplifyAShrInst(), SimplifyDiv(), SimplifyFAddInst(), SimplifyFDivInst(), SimplifyFMulInst(), SimplifyFRemInst(), SimplifyFSubInst(), SimplifyGEPInst(), SimplifyICmpInst(), SimplifyInsertValueInst(), SimplifyLShrInst(), SimplifyMulInst(), SimplifyOrInst(), SimplifyOrOfICmps(), SimplifyRem(), SimplifyShift(), SimplifyShlInst(), SimplifySubInst(), simplifyValueKnownNonZero(), SimplifyXorInst(), ThreadCmpOverSelect(), tryToMoveFreeBeforeNullTest(), llvm::AssumptionTracker::verifyAnalysis(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitAShr(), llvm::InstCombiner::visitBranchInst(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitFAdd(), llvm::InstCombiner::visitFCmpInst(), llvm::InstCombiner::visitFDiv(), llvm::InstCombiner::visitFMul(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitICmpInstWithInstAndIntCst(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitSDiv(), llvm::InstCombiner::visitSelectInst(), llvm::InstCombiner::visitSelectInstWithICmp(), llvm::InstCombiner::visitSExt(), llvm::InstCombiner::visitShl(), llvm::InstCombiner::visitSub(), llvm::InstCombiner::visitTrunc(), llvm::InstCombiner::visitUDiv(), visitUDivOperand(), llvm::InstCombiner::visitURem(), llvm::InstCombiner::visitXor(), and llvm::InstCombiner::visitZExt().