reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

include/llvm/IR/PatternMatch.h
   47 template <typename Val, typename Pattern> bool match(Val *V, const Pattern &P) {
  112   LTy L;
  113   RTy R;
  115   match_combine_or(const LTy &Left, const RTy &Right) : L(Left), R(Right) {}
  115   match_combine_or(const LTy &Left, const RTy &Right) : L(Left), R(Right) {}
  142 inline match_combine_or<LTy, RTy> m_CombineOr(const LTy &L, const RTy &R) {
  142 inline match_combine_or<LTy, RTy> m_CombineOr(const LTy &L, const RTy &R) {
  142 inline match_combine_or<LTy, RTy> m_CombineOr(const LTy &L, const RTy &R) {
  142 inline match_combine_or<LTy, RTy> m_CombineOr(const LTy &L, const RTy &R) {
  587 inline specificval_ty m_Specific(const Value *V) { return V; }
  707   LHS_t L;
  708   RHS_t R;
  712   AnyBinaryOp_match(const LHS_t &LHS, const RHS_t &RHS) : L(LHS), R(RHS) {}
  712   AnyBinaryOp_match(const LHS_t &LHS, const RHS_t &RHS) : L(LHS), R(RHS) {}
  724 inline AnyBinaryOp_match<LHS, RHS> m_BinOp(const LHS &L, const RHS &R) {
  724 inline AnyBinaryOp_match<LHS, RHS> m_BinOp(const LHS &L, const RHS &R) {
  724 inline AnyBinaryOp_match<LHS, RHS> m_BinOp(const LHS &L, const RHS &R) {
  724 inline AnyBinaryOp_match<LHS, RHS> m_BinOp(const LHS &L, const RHS &R) {
  735   LHS_t L;
  736   RHS_t R;
  740   BinaryOp_match(const LHS_t &LHS, const RHS_t &RHS) : L(LHS), R(RHS) {}
  740   BinaryOp_match(const LHS_t &LHS, const RHS_t &RHS) : L(LHS), R(RHS) {}
  759 inline BinaryOp_match<LHS, RHS, Instruction::Add> m_Add(const LHS &L,
  759 inline BinaryOp_match<LHS, RHS, Instruction::Add> m_Add(const LHS &L,
  759 inline BinaryOp_match<LHS, RHS, Instruction::Add> m_Add(const LHS &L,
  760                                                         const RHS &R) {
  771 inline BinaryOp_match<LHS, RHS, Instruction::Sub> m_Sub(const LHS &L,
  771 inline BinaryOp_match<LHS, RHS, Instruction::Sub> m_Sub(const LHS &L,
  771 inline BinaryOp_match<LHS, RHS, Instruction::Sub> m_Sub(const LHS &L,
  772                                                         const RHS &R) {
  777 inline BinaryOp_match<LHS, RHS, Instruction::FSub> m_FSub(const LHS &L,
  777 inline BinaryOp_match<LHS, RHS, Instruction::FSub> m_FSub(const LHS &L,
  777 inline BinaryOp_match<LHS, RHS, Instruction::FSub> m_FSub(const LHS &L,
  778                                                           const RHS &R) {
  783   Op_t X;
  785   FNeg_match(const Op_t &Op) : X(Op) {}
  813 inline FNeg_match<OpTy>
  814 m_FNeg(const OpTy &X) {
  820 inline BinaryOp_match<cstfp_pred_ty<is_any_zero_fp>, RHS, Instruction::FSub>
  821 m_FNegNSZ(const RHS &X) {
  826 inline BinaryOp_match<LHS, RHS, Instruction::Mul> m_Mul(const LHS &L,
  826 inline BinaryOp_match<LHS, RHS, Instruction::Mul> m_Mul(const LHS &L,
  826 inline BinaryOp_match<LHS, RHS, Instruction::Mul> m_Mul(const LHS &L,
  827                                                         const RHS &R) {
  832 inline BinaryOp_match<LHS, RHS, Instruction::FMul> m_FMul(const LHS &L,
  832 inline BinaryOp_match<LHS, RHS, Instruction::FMul> m_FMul(const LHS &L,
  838 inline BinaryOp_match<LHS, RHS, Instruction::UDiv> m_UDiv(const LHS &L,
  838 inline BinaryOp_match<LHS, RHS, Instruction::UDiv> m_UDiv(const LHS &L,
  838 inline BinaryOp_match<LHS, RHS, Instruction::UDiv> m_UDiv(const LHS &L,
  839                                                           const RHS &R) {
  844 inline BinaryOp_match<LHS, RHS, Instruction::SDiv> m_SDiv(const LHS &L,
  845                                                           const RHS &R) {
  850 inline BinaryOp_match<LHS, RHS, Instruction::FDiv> m_FDiv(const LHS &L,
  851                                                           const RHS &R) {
  856 inline BinaryOp_match<LHS, RHS, Instruction::URem> m_URem(const LHS &L,
  856 inline BinaryOp_match<LHS, RHS, Instruction::URem> m_URem(const LHS &L,
  856 inline BinaryOp_match<LHS, RHS, Instruction::URem> m_URem(const LHS &L,
  857                                                           const RHS &R) {
  862 inline BinaryOp_match<LHS, RHS, Instruction::SRem> m_SRem(const LHS &L,
  862 inline BinaryOp_match<LHS, RHS, Instruction::SRem> m_SRem(const LHS &L,
  862 inline BinaryOp_match<LHS, RHS, Instruction::SRem> m_SRem(const LHS &L,
  863                                                           const RHS &R) {
  874 inline BinaryOp_match<LHS, RHS, Instruction::And> m_And(const LHS &L,
  874 inline BinaryOp_match<LHS, RHS, Instruction::And> m_And(const LHS &L,
  874 inline BinaryOp_match<LHS, RHS, Instruction::And> m_And(const LHS &L,
  875                                                         const RHS &R) {
  880 inline BinaryOp_match<LHS, RHS, Instruction::Or> m_Or(const LHS &L,
  880 inline BinaryOp_match<LHS, RHS, Instruction::Or> m_Or(const LHS &L,
  886 inline BinaryOp_match<LHS, RHS, Instruction::Xor> m_Xor(const LHS &L,
  886 inline BinaryOp_match<LHS, RHS, Instruction::Xor> m_Xor(const LHS &L,
  886 inline BinaryOp_match<LHS, RHS, Instruction::Xor> m_Xor(const LHS &L,
  887                                                         const RHS &R) {
  892 inline BinaryOp_match<LHS, RHS, Instruction::Shl> m_Shl(const LHS &L,
  892 inline BinaryOp_match<LHS, RHS, Instruction::Shl> m_Shl(const LHS &L,
  892 inline BinaryOp_match<LHS, RHS, Instruction::Shl> m_Shl(const LHS &L,
  893                                                         const RHS &R) {
  898 inline BinaryOp_match<LHS, RHS, Instruction::LShr> m_LShr(const LHS &L,
  898 inline BinaryOp_match<LHS, RHS, Instruction::LShr> m_LShr(const LHS &L,
  898 inline BinaryOp_match<LHS, RHS, Instruction::LShr> m_LShr(const LHS &L,
  899                                                           const RHS &R) {
  904 inline BinaryOp_match<LHS, RHS, Instruction::AShr> m_AShr(const LHS &L,
  904 inline BinaryOp_match<LHS, RHS, Instruction::AShr> m_AShr(const LHS &L,
  904 inline BinaryOp_match<LHS, RHS, Instruction::AShr> m_AShr(const LHS &L,
  905                                                           const RHS &R) {
  912   LHS_t L;
  913   RHS_t R;
  915   OverflowingBinaryOp_match(const LHS_t &LHS, const RHS_t &RHS)
  915   OverflowingBinaryOp_match(const LHS_t &LHS, const RHS_t &RHS)
  935 inline OverflowingBinaryOp_match<LHS, RHS, Instruction::Add,
  937 m_NSWAdd(const LHS &L, const RHS &R) {
  943 inline OverflowingBinaryOp_match<LHS, RHS, Instruction::Sub,
  943 inline OverflowingBinaryOp_match<LHS, RHS, Instruction::Sub,
  945 m_NSWSub(const LHS &L, const RHS &R) {
  945 m_NSWSub(const LHS &L, const RHS &R) {
  959 inline OverflowingBinaryOp_match<LHS, RHS, Instruction::Shl,
  959 inline OverflowingBinaryOp_match<LHS, RHS, Instruction::Shl,
  961 m_NSWShl(const LHS &L, const RHS &R) {
  961 m_NSWShl(const LHS &L, const RHS &R) {
  968 inline OverflowingBinaryOp_match<LHS, RHS, Instruction::Add,
  970 m_NUWAdd(const LHS &L, const RHS &R) {
  984 inline OverflowingBinaryOp_match<LHS, RHS, Instruction::Mul,
  984 inline OverflowingBinaryOp_match<LHS, RHS, Instruction::Mul,
  986 m_NUWMul(const LHS &L, const RHS &R) {
  986 m_NUWMul(const LHS &L, const RHS &R) {
  992 inline OverflowingBinaryOp_match<LHS, RHS, Instruction::Shl,
  992 inline OverflowingBinaryOp_match<LHS, RHS, Instruction::Shl,
  994 m_NUWShl(const LHS &L, const RHS &R) {
  994 m_NUWShl(const LHS &L, const RHS &R) {
 1005   LHS_t L;
 1006   RHS_t R;
 1008   BinOpPred_match(const LHS_t &LHS, const RHS_t &RHS) : L(LHS), R(RHS) {}
 1008   BinOpPred_match(const LHS_t &LHS, const RHS_t &RHS) : L(LHS), R(RHS) {}
 1064 inline BinOpPred_match<LHS, RHS, is_right_shift_op> m_Shr(const LHS &L,
 1065                                                           const RHS &R) {
 1071 inline BinOpPred_match<LHS, RHS, is_logical_shift_op>
 1072 m_LogicalShift(const LHS &L, const RHS &R) {
 1085 inline BinOpPred_match<LHS, RHS, is_idiv_op> m_IDiv(const LHS &L,
 1085 inline BinOpPred_match<LHS, RHS, is_idiv_op> m_IDiv(const LHS &L,
 1085 inline BinOpPred_match<LHS, RHS, is_idiv_op> m_IDiv(const LHS &L,
 1086                                                     const RHS &R) {
 1124   LHS_t L;
 1125   RHS_t R;
 1129   CmpClass_match(PredicateTy &Pred, const LHS_t &LHS, const RHS_t &RHS)
 1129   CmpClass_match(PredicateTy &Pred, const LHS_t &LHS, const RHS_t &RHS)
 1145 inline CmpClass_match<LHS, RHS, CmpInst, CmpInst::Predicate>
 1145 inline CmpClass_match<LHS, RHS, CmpInst, CmpInst::Predicate>
 1146 m_Cmp(CmpInst::Predicate &Pred, const LHS &L, const RHS &R) {
 1146 m_Cmp(CmpInst::Predicate &Pred, const LHS &L, const RHS &R) {
 1151 inline CmpClass_match<LHS, RHS, ICmpInst, ICmpInst::Predicate>
 1151 inline CmpClass_match<LHS, RHS, ICmpInst, ICmpInst::Predicate>
 1152 m_ICmp(ICmpInst::Predicate &Pred, const LHS &L, const RHS &R) {
 1152 m_ICmp(ICmpInst::Predicate &Pred, const LHS &L, const RHS &R) {
 1157 inline CmpClass_match<LHS, RHS, FCmpInst, FCmpInst::Predicate>
 1157 inline CmpClass_match<LHS, RHS, FCmpInst, FCmpInst::Predicate>
 1158 m_FCmp(FCmpInst::Predicate &Pred, const LHS &L, const RHS &R) {
 1158 m_FCmp(FCmpInst::Predicate &Pred, const LHS &L, const RHS &R) {
 1168   T0 Op1;
 1170   OneOps_match(const T0 &Op1) : Op1(Op1) {}
 1183   T0 Op1;
 1184   T1 Op2;
 1186   TwoOps_match(const T0 &Op1, const T1 &Op2) : Op1(Op1), Op2(Op2) {}
 1186   TwoOps_match(const T0 &Op1, const T1 &Op2) : Op1(Op1), Op2(Op2) {}
 1200   T0 Op1;
 1201   T1 Op2;
 1202   T2 Op3;
 1204   ThreeOps_match(const T0 &Op1, const T1 &Op2, const T2 &Op3)
 1204   ThreeOps_match(const T0 &Op1, const T1 &Op2, const T2 &Op3)
 1204   ThreeOps_match(const T0 &Op1, const T1 &Op2, const T2 &Op3)
 1219 inline ThreeOps_match<Cond, LHS, RHS, Instruction::Select>
 1220 m_Select(const Cond &C, const LHS &L, const RHS &R) {
 1235 inline ThreeOps_match<Val_t, Elt_t, Idx_t, Instruction::InsertElement>
 1236 m_InsertElement(const Val_t &Val, const Elt_t &Elt, const Idx_t &Idx) {
 1243 inline TwoOps_match<Val_t, Idx_t, Instruction::ExtractElement>
 1243 inline TwoOps_match<Val_t, Idx_t, Instruction::ExtractElement>
 1244 m_ExtractElement(const Val_t &Val, const Idx_t &Idx) {
 1244 m_ExtractElement(const Val_t &Val, const Idx_t &Idx) {
 1250 inline ThreeOps_match<V1_t, V2_t, Mask_t, Instruction::ShuffleVector>
 1250 inline ThreeOps_match<V1_t, V2_t, Mask_t, Instruction::ShuffleVector>
 1250 inline ThreeOps_match<V1_t, V2_t, Mask_t, Instruction::ShuffleVector>
 1251 m_ShuffleVector(const V1_t &v1, const V2_t &v2, const Mask_t &m) {
 1251 m_ShuffleVector(const V1_t &v1, const V2_t &v2, const Mask_t &m) {
 1251 m_ShuffleVector(const V1_t &v1, const V2_t &v2, const Mask_t &m) {
 1258 inline OneOps_match<OpTy, Instruction::Load> m_Load(const OpTy &Op) {
 1258 inline OneOps_match<OpTy, Instruction::Load> m_Load(const OpTy &Op) {
 1264 inline TwoOps_match<ValueOpTy, PointerOpTy, Instruction::Store>
 1265 m_Store(const ValueOpTy &ValueOp, const PointerOpTy &PointerOp) {
 1275   Op_t Op;
 1277   CastClass_match(const Op_t &OpMatch) : Op(OpMatch) {}
 1294 inline CastClass_match<OpTy, Instruction::PtrToInt> m_PtrToInt(const OpTy &Op) {
 1294 inline CastClass_match<OpTy, Instruction::PtrToInt> m_PtrToInt(const OpTy &Op) {
 1300 inline CastClass_match<OpTy, Instruction::Trunc> m_Trunc(const OpTy &Op) {
 1300 inline CastClass_match<OpTy, Instruction::Trunc> m_Trunc(const OpTy &Op) {
 1312 inline CastClass_match<OpTy, Instruction::SExt> m_SExt(const OpTy &Op) {
 1312 inline CastClass_match<OpTy, Instruction::SExt> m_SExt(const OpTy &Op) {
 1318 inline CastClass_match<OpTy, Instruction::ZExt> m_ZExt(const OpTy &Op) {
 1318 inline CastClass_match<OpTy, Instruction::ZExt> m_ZExt(const OpTy &Op) {
 1323 inline match_combine_or<CastClass_match<OpTy, Instruction::ZExt>, OpTy>
 1323 inline match_combine_or<CastClass_match<OpTy, Instruction::ZExt>, OpTy>
 1324 m_ZExtOrSelf(const OpTy &Op) {
 1432   LHS_t L;
 1433   RHS_t R;
 1437   MaxMin_match(const LHS_t &LHS, const RHS_t &RHS) : L(LHS), R(RHS) {}
 1437   MaxMin_match(const LHS_t &LHS, const RHS_t &RHS) : L(LHS), R(RHS) {}
 1524 inline MaxMin_match<ICmpInst, LHS, RHS, smax_pred_ty> m_SMax(const LHS &L,
 1524 inline MaxMin_match<ICmpInst, LHS, RHS, smax_pred_ty> m_SMax(const LHS &L,
 1530 inline MaxMin_match<ICmpInst, LHS, RHS, smin_pred_ty> m_SMin(const LHS &L,
 1530 inline MaxMin_match<ICmpInst, LHS, RHS, smin_pred_ty> m_SMin(const LHS &L,
 1536 inline MaxMin_match<ICmpInst, LHS, RHS, umax_pred_ty> m_UMax(const LHS &L,
 1536 inline MaxMin_match<ICmpInst, LHS, RHS, umax_pred_ty> m_UMax(const LHS &L,
 1542 inline MaxMin_match<ICmpInst, LHS, RHS, umin_pred_ty> m_UMin(const LHS &L,
 1542 inline MaxMin_match<ICmpInst, LHS, RHS, umin_pred_ty> m_UMin(const LHS &L,
 1557 inline MaxMin_match<FCmpInst, LHS, RHS, ofmax_pred_ty> m_OrdFMax(const LHS &L,
 1557 inline MaxMin_match<FCmpInst, LHS, RHS, ofmax_pred_ty> m_OrdFMax(const LHS &L,
 1572 inline MaxMin_match<FCmpInst, LHS, RHS, ofmin_pred_ty> m_OrdFMin(const LHS &L,
 1572 inline MaxMin_match<FCmpInst, LHS, RHS, ofmin_pred_ty> m_OrdFMin(const LHS &L,
 1587 inline MaxMin_match<FCmpInst, LHS, RHS, ufmax_pred_ty>
 1588 m_UnordFMax(const LHS &L, const RHS &R) {
 1602 inline MaxMin_match<FCmpInst, LHS, RHS, ufmin_pred_ty>
 1603 m_UnordFMin(const LHS &L, const RHS &R) {
 1669   Opnd_t Val;
 1671   Argument_match(unsigned OpIdx, const Opnd_t &V) : OpI(OpIdx), Val(V) {}
 1683 inline Argument_match<Opnd_t> m_Argument(const Opnd_t &Op) {
 1683 inline Argument_match<Opnd_t> m_Argument(const Opnd_t &Op) {
 1711   using Ty = match_combine_and<IntrinsicID_match, Argument_match<T0>>;
 1715       match_combine_and<typename m_Intrinsic_Ty<T0>::Ty, Argument_match<T1>>;
 1737 inline typename m_Intrinsic_Ty<T0>::Ty m_Intrinsic(const T0 &Op0) {
 1737 inline typename m_Intrinsic_Ty<T0>::Ty m_Intrinsic(const T0 &Op0) {
 1742 inline typename m_Intrinsic_Ty<T0, T1>::Ty m_Intrinsic(const T0 &Op0,
 1743                                                        const T1 &Op1) {
 1772 inline typename m_Intrinsic_Ty<Opnd0>::Ty m_FAbs(const Opnd0 &Op0) {
 1772 inline typename m_Intrinsic_Ty<Opnd0>::Ty m_FAbs(const Opnd0 &Op0) {
 1799 inline AnyBinaryOp_match<LHS, RHS, true> m_c_BinOp(const LHS &L, const RHS &R) {
 1799 inline AnyBinaryOp_match<LHS, RHS, true> m_c_BinOp(const LHS &L, const RHS &R) {
 1806 inline CmpClass_match<LHS, RHS, ICmpInst, ICmpInst::Predicate, true>
 1806 inline CmpClass_match<LHS, RHS, ICmpInst, ICmpInst::Predicate, true>
 1807 m_c_ICmp(ICmpInst::Predicate &Pred, const LHS &L, const RHS &R) {
 1807 m_c_ICmp(ICmpInst::Predicate &Pred, const LHS &L, const RHS &R) {
 1814 inline BinaryOp_match<LHS, RHS, Instruction::Add, true> m_c_Add(const LHS &L,
 1814 inline BinaryOp_match<LHS, RHS, Instruction::Add, true> m_c_Add(const LHS &L,
 1814 inline BinaryOp_match<LHS, RHS, Instruction::Add, true> m_c_Add(const LHS &L,
 1815                                                                 const RHS &R) {
 1821 inline BinaryOp_match<LHS, RHS, Instruction::Mul, true> m_c_Mul(const LHS &L,
 1821 inline BinaryOp_match<LHS, RHS, Instruction::Mul, true> m_c_Mul(const LHS &L,
 1821 inline BinaryOp_match<LHS, RHS, Instruction::Mul, true> m_c_Mul(const LHS &L,
 1822                                                                 const RHS &R) {
 1828 inline BinaryOp_match<LHS, RHS, Instruction::And, true> m_c_And(const LHS &L,
 1828 inline BinaryOp_match<LHS, RHS, Instruction::And, true> m_c_And(const LHS &L,
 1828 inline BinaryOp_match<LHS, RHS, Instruction::And, true> m_c_And(const LHS &L,
 1829                                                                 const RHS &R) {
 1835 inline BinaryOp_match<LHS, RHS, Instruction::Or, true> m_c_Or(const LHS &L,
 1835 inline BinaryOp_match<LHS, RHS, Instruction::Or, true> m_c_Or(const LHS &L,
 1835 inline BinaryOp_match<LHS, RHS, Instruction::Or, true> m_c_Or(const LHS &L,
 1836                                                               const RHS &R) {
 1842 inline BinaryOp_match<LHS, RHS, Instruction::Xor, true> m_c_Xor(const LHS &L,
 1842 inline BinaryOp_match<LHS, RHS, Instruction::Xor, true> m_c_Xor(const LHS &L,
 1842 inline BinaryOp_match<LHS, RHS, Instruction::Xor, true> m_c_Xor(const LHS &L,
 1843                                                                 const RHS &R) {
 1849 inline BinaryOp_match<cst_pred_ty<is_zero_int>, ValTy, Instruction::Sub>
 1850 m_Neg(const ValTy &V) {
 1856 inline BinaryOp_match<ValTy, cst_pred_ty<is_all_ones>, Instruction::Xor, true>
 1857 m_Not(const ValTy &V) {
 1863 inline MaxMin_match<ICmpInst, LHS, RHS, smin_pred_ty, true>
 1863 inline MaxMin_match<ICmpInst, LHS, RHS, smin_pred_ty, true>
 1864 m_c_SMin(const LHS &L, const RHS &R) {
 1864 m_c_SMin(const LHS &L, const RHS &R) {
 1869 inline MaxMin_match<ICmpInst, LHS, RHS, smax_pred_ty, true>
 1869 inline MaxMin_match<ICmpInst, LHS, RHS, smax_pred_ty, true>
 1870 m_c_SMax(const LHS &L, const RHS &R) {
 1870 m_c_SMax(const LHS &L, const RHS &R) {
 1875 inline MaxMin_match<ICmpInst, LHS, RHS, umin_pred_ty, true>
 1875 inline MaxMin_match<ICmpInst, LHS, RHS, umin_pred_ty, true>
 1876 m_c_UMin(const LHS &L, const RHS &R) {
 1876 m_c_UMin(const LHS &L, const RHS &R) {
 1881 inline MaxMin_match<ICmpInst, LHS, RHS, umax_pred_ty, true>
 1881 inline MaxMin_match<ICmpInst, LHS, RHS, umax_pred_ty, true>
 1882 m_c_UMax(const LHS &L, const RHS &R) {
 1882 m_c_UMax(const LHS &L, const RHS &R) {
 1888 inline BinaryOp_match<LHS, RHS, Instruction::FAdd, true>
 1889 m_c_FAdd(const LHS &L, const RHS &R) {
 1895 inline BinaryOp_match<LHS, RHS, Instruction::FMul, true>
 1895 inline BinaryOp_match<LHS, RHS, Instruction::FMul, true>
 1896 m_c_FMul(const LHS &L, const RHS &R) {
 1896 m_c_FMul(const LHS &L, const RHS &R) {