LLVM 20.0.0git
Namespaces | Classes | Typedefs | Functions
llvm::VPlanPatternMatch Namespace Reference

Namespaces

namespace  detail
 

Classes

struct  bind_ty
 
struct  class_match
 
struct  match_combine_or
 Matching combinators. More...
 
struct  Recipe_match
 
struct  specific_intval
 Match a specified integer value or vector of all elements of that value. More...
 
struct  specificval_ty
 Match a specified VPValue. More...
 

Typedefs

template<typename Op0_t , unsigned Opcode, typename... RecipeTys>
using UnaryRecipe_match = Recipe_match< std::tuple< Op0_t >, Opcode, false, RecipeTys... >
 
template<typename Op0_t , unsigned Opcode>
using UnaryVPInstruction_match = UnaryRecipe_match< Op0_t, Opcode, VPInstruction >
 
template<typename Op0_t , unsigned Opcode>
using AllUnaryRecipe_match = UnaryRecipe_match< Op0_t, Opcode, VPWidenRecipe, VPReplicateRecipe, VPWidenCastRecipe, VPInstruction >
 
template<typename Op0_t , typename Op1_t , unsigned Opcode, bool Commutative, typename... RecipeTys>
using BinaryRecipe_match = Recipe_match< std::tuple< Op0_t, Op1_t >, Opcode, Commutative, RecipeTys... >
 
template<typename Op0_t , typename Op1_t , unsigned Opcode>
using BinaryVPInstruction_match = BinaryRecipe_match< Op0_t, Op1_t, Opcode, false, VPInstruction >
 
template<typename Op0_t , typename Op1_t , unsigned Opcode, bool Commutative = false>
using AllBinaryRecipe_match = BinaryRecipe_match< Op0_t, Op1_t, Opcode, Commutative, VPWidenRecipe, VPReplicateRecipe, VPWidenCastRecipe, VPInstruction >
 
template<typename Op0_t , typename Op1_t , typename Op2_t , unsigned Opcode>
using AllTernaryRecipe_match = Recipe_match< std::tuple< Op0_t, Op1_t, Op2_t >, Opcode, false, VPReplicateRecipe, VPInstruction, VPWidenSelectRecipe >
 
using VPCanonicalIVPHI_match = Recipe_match< std::tuple<>, 0, false, VPCanonicalIVPHIRecipe >
 
template<typename Op0_t , typename Op1_t >
using VPScalarIVSteps_match = Recipe_match< std::tuple< Op0_t, Op1_t >, 0, false, VPScalarIVStepsRecipe >
 

Functions

template<typename Val , typename Pattern >
bool match (Val *V, const Pattern &P)
 
template<typename Pattern >
bool match (VPUser *U, const Pattern &P)
 
class_match< VPValuem_VPValue ()
 Match an arbitrary VPValue and ignore it.
 
specificval_ty m_Specific (const VPValue *VPV)
 
specific_intval< 0 > m_SpecificInt (uint64_t V)
 
specific_intval< 1 > m_False ()
 
specific_intval< 1 > m_True ()
 
template<typename LTy , typename RTy >
match_combine_or< LTy, RTy > m_CombineOr (const LTy &L, const RTy &R)
 
bind_ty< VPValuem_VPValue (VPValue *&V)
 Match a VPValue, capturing it if we match.
 
template<unsigned Opcode, typename Op0_t >
UnaryVPInstruction_match< Op0_t, Opcode > m_VPInstruction (const Op0_t &Op0)
 
template<unsigned Opcode, typename Op0_t , typename Op1_t >
BinaryVPInstruction_match< Op0_t, Op1_t, Opcode > m_VPInstruction (const Op0_t &Op0, const Op1_t &Op1)
 
template<typename Op0_t >
UnaryVPInstruction_match< Op0_t, VPInstruction::Notm_Not (const Op0_t &Op0)
 
template<typename Op0_t >
UnaryVPInstruction_match< Op0_t, VPInstruction::BranchOnCondm_BranchOnCond (const Op0_t &Op0)
 
template<typename Op0_t , typename Op1_t >
BinaryVPInstruction_match< Op0_t, Op1_t, VPInstruction::ActiveLaneMaskm_ActiveLaneMask (const Op0_t &Op0, const Op1_t &Op1)
 
template<typename Op0_t , typename Op1_t >
BinaryVPInstruction_match< Op0_t, Op1_t, VPInstruction::BranchOnCountm_BranchOnCount (const Op0_t &Op0, const Op1_t &Op1)
 
template<unsigned Opcode, typename Op0_t >
AllUnaryRecipe_match< Op0_t, Opcode > m_Unary (const Op0_t &Op0)
 
template<typename Op0_t >
AllUnaryRecipe_match< Op0_t, Instruction::Trunc > m_Trunc (const Op0_t &Op0)
 
template<typename Op0_t >
AllUnaryRecipe_match< Op0_t, Instruction::ZExt > m_ZExt (const Op0_t &Op0)
 
template<typename Op0_t >
AllUnaryRecipe_match< Op0_t, Instruction::SExt > m_SExt (const Op0_t &Op0)
 
template<typename Op0_t >
match_combine_or< AllUnaryRecipe_match< Op0_t, Instruction::ZExt >, AllUnaryRecipe_match< Op0_t, Instruction::SExt > > m_ZExtOrSExt (const Op0_t &Op0)
 
template<unsigned Opcode, typename Op0_t , typename Op1_t , bool Commutative = false>
AllBinaryRecipe_match< Op0_t, Op1_t, Opcode, Commutative > m_Binary (const Op0_t &Op0, const Op1_t &Op1)
 
template<typename Op0_t , typename Op1_t >
AllBinaryRecipe_match< Op0_t, Op1_t, Instruction::Mul > m_Mul (const Op0_t &Op0, const Op1_t &Op1)
 
template<typename Op0_t , typename Op1_t >
AllBinaryRecipe_match< Op0_t, Op1_t, Instruction::Mul, truem_c_Mul (const Op0_t &Op0, const Op1_t &Op1)
 
template<typename Op0_t , typename Op1_t , bool Commutative = false>
AllBinaryRecipe_match< Op0_t, Op1_t, Instruction::Or, Commutative > m_BinaryOr (const Op0_t &Op0, const Op1_t &Op1)
 Match a binary OR operation.
 
template<typename Op0_t , typename Op1_t >
AllBinaryRecipe_match< Op0_t, Op1_t, Instruction::Or, truem_c_BinaryOr (const Op0_t &Op0, const Op1_t &Op1)
 
template<typename Op0_t , typename Op1_t , typename Op2_t >
AllTernaryRecipe_match< Op0_t, Op1_t, Op2_t, Instruction::Select > m_Select (const Op0_t &Op0, const Op1_t &Op1, const Op2_t &Op2)
 
template<typename Op0_t , typename Op1_t >
match_combine_or< BinaryVPInstruction_match< Op0_t, Op1_t, VPInstruction::LogicalAnd >, AllTernaryRecipe_match< Op0_t, Op1_t, specific_intval< 1 >, Instruction::Select > > m_LogicalAnd (const Op0_t &Op0, const Op1_t &Op1)
 
template<typename Op0_t , typename Op1_t >
AllTernaryRecipe_match< Op0_t, specific_intval< 1 >, Op1_t, Instruction::Select > m_LogicalOr (const Op0_t &Op0, const Op1_t &Op1)
 
VPCanonicalIVPHI_match m_CanonicalIV ()
 
template<typename Op0_t , typename Op1_t >
VPScalarIVSteps_match< Op0_t, Op1_t > m_ScalarIVSteps (const Op0_t &Op0, const Op1_t &Op1)
 

Typedef Documentation

◆ AllBinaryRecipe_match

template<typename Op0_t , typename Op1_t , unsigned Opcode, bool Commutative = false>
using llvm::VPlanPatternMatch::AllBinaryRecipe_match = typedef BinaryRecipe_match<Op0_t, Op1_t, Opcode, Commutative, VPWidenRecipe, VPReplicateRecipe, VPWidenCastRecipe, VPInstruction>

Definition at line 234 of file VPlanPatternMatch.h.

◆ AllTernaryRecipe_match

template<typename Op0_t , typename Op1_t , typename Op2_t , unsigned Opcode>
using llvm::VPlanPatternMatch::AllTernaryRecipe_match = typedef Recipe_match<std::tuple<Op0_t, Op1_t, Op2_t>, Opcode, false, VPReplicateRecipe, VPInstruction, VPWidenSelectRecipe>

Definition at line 340 of file VPlanPatternMatch.h.

◆ AllUnaryRecipe_match

Definition at line 218 of file VPlanPatternMatch.h.

◆ BinaryRecipe_match

template<typename Op0_t , typename Op1_t , unsigned Opcode, bool Commutative, typename... RecipeTys>
using llvm::VPlanPatternMatch::BinaryRecipe_match = typedef Recipe_match<std::tuple<Op0_t, Op1_t>, Opcode, Commutative, RecipeTys...>

Definition at line 224 of file VPlanPatternMatch.h.

◆ BinaryVPInstruction_match

template<typename Op0_t , typename Op1_t , unsigned Opcode>
using llvm::VPlanPatternMatch::BinaryVPInstruction_match = typedef BinaryRecipe_match<Op0_t, Op1_t, Opcode, false, VPInstruction>

Definition at line 228 of file VPlanPatternMatch.h.

◆ UnaryRecipe_match

template<typename Op0_t , unsigned Opcode, typename... RecipeTys>
using llvm::VPlanPatternMatch::UnaryRecipe_match = typedef Recipe_match<std::tuple<Op0_t>, Opcode, false, RecipeTys...>

Definition at line 210 of file VPlanPatternMatch.h.

◆ UnaryVPInstruction_match

template<typename Op0_t , unsigned Opcode>
using llvm::VPlanPatternMatch::UnaryVPInstruction_match = typedef UnaryRecipe_match<Op0_t, Opcode, VPInstruction>

Definition at line 214 of file VPlanPatternMatch.h.

◆ VPCanonicalIVPHI_match

Definition at line 369 of file VPlanPatternMatch.h.

◆ VPScalarIVSteps_match

template<typename Op0_t , typename Op1_t >
using llvm::VPlanPatternMatch::VPScalarIVSteps_match = typedef Recipe_match<std::tuple<Op0_t, Op1_t>, 0, false, VPScalarIVStepsRecipe>

Definition at line 377 of file VPlanPatternMatch.h.

Function Documentation

◆ m_ActiveLaneMask()

template<typename Op0_t , typename Op1_t >
BinaryVPInstruction_match< Op0_t, Op1_t, VPInstruction::ActiveLaneMask > llvm::VPlanPatternMatch::m_ActiveLaneMask ( const Op0_t &  Op0,
const Op1_t &  Op1 
)
inline

Definition at line 264 of file VPlanPatternMatch.h.

◆ m_Binary()

template<unsigned Opcode, typename Op0_t , typename Op1_t , bool Commutative = false>
AllBinaryRecipe_match< Op0_t, Op1_t, Opcode, Commutative > llvm::VPlanPatternMatch::m_Binary ( const Op0_t &  Op0,
const Op1_t &  Op1 
)
inline

Definition at line 305 of file VPlanPatternMatch.h.

◆ m_BinaryOr()

template<typename Op0_t , typename Op1_t , bool Commutative = false>
AllBinaryRecipe_match< Op0_t, Op1_t, Instruction::Or, Commutative > llvm::VPlanPatternMatch::m_BinaryOr ( const Op0_t &  Op0,
const Op1_t &  Op1 
)
inline

Match a binary OR operation.

Note that while conceptually the operands can be matched commutatively, Commutative defaults to false in line with the IR-based pattern matching infrastructure. Use m_c_BinaryOr for a commutative version of the matcher.

Definition at line 328 of file VPlanPatternMatch.h.

Referenced by m_c_BinaryOr().

◆ m_BranchOnCond()

template<typename Op0_t >
UnaryVPInstruction_match< Op0_t, VPInstruction::BranchOnCond > llvm::VPlanPatternMatch::m_BranchOnCond ( const Op0_t &  Op0)
inline

Definition at line 258 of file VPlanPatternMatch.h.

Referenced by hasConditionalTerminator().

◆ m_BranchOnCount()

template<typename Op0_t , typename Op1_t >
BinaryVPInstruction_match< Op0_t, Op1_t, VPInstruction::BranchOnCount > llvm::VPlanPatternMatch::m_BranchOnCount ( const Op0_t &  Op0,
const Op1_t &  Op1 
)
inline

Definition at line 270 of file VPlanPatternMatch.h.

Referenced by hasConditionalTerminator().

◆ m_c_BinaryOr()

template<typename Op0_t , typename Op1_t >
AllBinaryRecipe_match< Op0_t, Op1_t, Instruction::Or, true > llvm::VPlanPatternMatch::m_c_BinaryOr ( const Op0_t &  Op0,
const Op1_t &  Op1 
)
inline

Definition at line 335 of file VPlanPatternMatch.h.

References m_BinaryOr().

◆ m_c_Mul()

template<typename Op0_t , typename Op1_t >
AllBinaryRecipe_match< Op0_t, Op1_t, Instruction::Mul, true > llvm::VPlanPatternMatch::m_c_Mul ( const Op0_t &  Op0,
const Op1_t &  Op1 
)
inline

Definition at line 318 of file VPlanPatternMatch.h.

◆ m_CanonicalIV()

VPCanonicalIVPHI_match llvm::VPlanPatternMatch::m_CanonicalIV ( )
inline

Definition at line 372 of file VPlanPatternMatch.h.

◆ m_CombineOr()

template<typename LTy , typename RTy >
match_combine_or< LTy, RTy > llvm::VPlanPatternMatch::m_CombineOr ( const LTy &  L,
const RTy &  R 
)
inline

Definition at line 120 of file VPlanPatternMatch.h.

Referenced by m_LogicalAnd(), and m_ZExtOrSExt().

◆ m_False()

specific_intval< 1 > llvm::VPlanPatternMatch::m_False ( )
inline

Definition at line 99 of file VPlanPatternMatch.h.

Referenced by m_LogicalAnd().

◆ m_LogicalAnd()

template<typename Op0_t , typename Op1_t >
match_combine_or< BinaryVPInstruction_match< Op0_t, Op1_t, VPInstruction::LogicalAnd >, AllTernaryRecipe_match< Op0_t, Op1_t, specific_intval< 1 >, Instruction::Select > > llvm::VPlanPatternMatch::m_LogicalAnd ( const Op0_t &  Op0,
const Op1_t &  Op1 
)
inline

Definition at line 356 of file VPlanPatternMatch.h.

References m_CombineOr(), m_False(), and m_Select().

◆ m_LogicalOr()

template<typename Op0_t , typename Op1_t >
AllTernaryRecipe_match< Op0_t, specific_intval< 1 >, Op1_t, Instruction::Select > llvm::VPlanPatternMatch::m_LogicalOr ( const Op0_t &  Op0,
const Op1_t &  Op1 
)
inline

Definition at line 365 of file VPlanPatternMatch.h.

References m_Select(), and m_True().

◆ m_Mul()

template<typename Op0_t , typename Op1_t >
AllBinaryRecipe_match< Op0_t, Op1_t, Instruction::Mul > llvm::VPlanPatternMatch::m_Mul ( const Op0_t &  Op0,
const Op1_t &  Op1 
)
inline

Definition at line 311 of file VPlanPatternMatch.h.

◆ m_Not()

template<typename Op0_t >
UnaryVPInstruction_match< Op0_t, VPInstruction::Not > llvm::VPlanPatternMatch::m_Not ( const Op0_t &  Op0)
inline

Definition at line 252 of file VPlanPatternMatch.h.

◆ m_ScalarIVSteps()

template<typename Op0_t , typename Op1_t >
VPScalarIVSteps_match< Op0_t, Op1_t > llvm::VPlanPatternMatch::m_ScalarIVSteps ( const Op0_t &  Op0,
const Op1_t &  Op1 
)
inline

Definition at line 381 of file VPlanPatternMatch.h.

◆ m_Select()

template<typename Op0_t , typename Op1_t , typename Op2_t >
AllTernaryRecipe_match< Op0_t, Op1_t, Op2_t, Instruction::Select > llvm::VPlanPatternMatch::m_Select ( const Op0_t &  Op0,
const Op1_t &  Op1,
const Op2_t &  Op2 
)
inline

Definition at line 346 of file VPlanPatternMatch.h.

Referenced by m_LogicalAnd(), and m_LogicalOr().

◆ m_SExt()

template<typename Op0_t >
AllUnaryRecipe_match< Op0_t, Instruction::SExt > llvm::VPlanPatternMatch::m_SExt ( const Op0_t &  Op0)
inline

Definition at line 291 of file VPlanPatternMatch.h.

Referenced by m_ZExtOrSExt().

◆ m_Specific()

specificval_ty llvm::VPlanPatternMatch::m_Specific ( const VPValue VPV)
inline

Definition at line 67 of file VPlanPatternMatch.h.

◆ m_SpecificInt()

specific_intval< 0 > llvm::VPlanPatternMatch::m_SpecificInt ( uint64_t  V)
inline

Definition at line 95 of file VPlanPatternMatch.h.

◆ m_True()

specific_intval< 1 > llvm::VPlanPatternMatch::m_True ( )
inline

Definition at line 101 of file VPlanPatternMatch.h.

Referenced by m_LogicalOr().

◆ m_Trunc()

template<typename Op0_t >
AllUnaryRecipe_match< Op0_t, Instruction::Trunc > llvm::VPlanPatternMatch::m_Trunc ( const Op0_t &  Op0)
inline

Definition at line 281 of file VPlanPatternMatch.h.

◆ m_Unary()

template<unsigned Opcode, typename Op0_t >
AllUnaryRecipe_match< Op0_t, Opcode > llvm::VPlanPatternMatch::m_Unary ( const Op0_t &  Op0)
inline

Definition at line 275 of file VPlanPatternMatch.h.

◆ m_VPInstruction() [1/2]

template<unsigned Opcode, typename Op0_t >
UnaryVPInstruction_match< Op0_t, Opcode > llvm::VPlanPatternMatch::m_VPInstruction ( const Op0_t &  Op0)
inline

Definition at line 240 of file VPlanPatternMatch.h.

◆ m_VPInstruction() [2/2]

template<unsigned Opcode, typename Op0_t , typename Op1_t >
BinaryVPInstruction_match< Op0_t, Op1_t, Opcode > llvm::VPlanPatternMatch::m_VPInstruction ( const Op0_t &  Op0,
const Op1_t &  Op1 
)
inline

Definition at line 246 of file VPlanPatternMatch.h.

◆ m_VPValue() [1/2]

class_match< VPValue > llvm::VPlanPatternMatch::m_VPValue ( )
inline

Match an arbitrary VPValue and ignore it.

Definition at line 42 of file VPlanPatternMatch.h.

Referenced by hasConditionalTerminator().

◆ m_VPValue() [2/2]

bind_ty< VPValue > llvm::VPlanPatternMatch::m_VPValue ( VPValue *&  V)
inline

Match a VPValue, capturing it if we match.

Definition at line 125 of file VPlanPatternMatch.h.

◆ m_ZExt()

template<typename Op0_t >
AllUnaryRecipe_match< Op0_t, Instruction::ZExt > llvm::VPlanPatternMatch::m_ZExt ( const Op0_t &  Op0)
inline

Definition at line 286 of file VPlanPatternMatch.h.

Referenced by m_ZExtOrSExt().

◆ m_ZExtOrSExt()

template<typename Op0_t >
match_combine_or< AllUnaryRecipe_match< Op0_t, Instruction::ZExt >, AllUnaryRecipe_match< Op0_t, Instruction::SExt > > llvm::VPlanPatternMatch::m_ZExtOrSExt ( const Op0_t &  Op0)
inline

Definition at line 298 of file VPlanPatternMatch.h.

References m_CombineOr(), m_SExt(), and m_ZExt().

◆ match() [1/2]

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

Definition at line 28 of file VPlanPatternMatch.h.

References P.

Referenced by match().

◆ match() [2/2]

template<typename Pattern >
bool llvm::VPlanPatternMatch::match ( VPUser U,
const Pattern P 
)

Definition at line 32 of file VPlanPatternMatch.h.

References match(), and P.