LLVM 22.0.0git
Classes | Functions
llvm::SCEVPatternMatch Namespace Reference

Classes

struct  bind_cst_ty
 
struct  bind_ty
 
struct  class_match
 
struct  cst_pred_ty
 
struct  is_all_ones
 
struct  is_one
 
struct  is_specific_cst
 
struct  is_specific_signed_cst
 
struct  is_zero
 
struct  SCEVAffineAddRec_match
 Match an affine SCEVAddRecExpr. More...
 
struct  SCEVBinaryExpr_match
 Match a binary SCEV. More...
 
struct  SCEVUnaryExpr_match
 Match a unary SCEV. More...
 
struct  specificloop_ty
 Match a specified const Loop*. More...
 
struct  specificscev_ty
 Match a specified const SCEV *. More...
 

Functions

template<typename Pattern >
bool match (const SCEV *S, const Pattern &P)
 
cst_pred_ty< is_zerom_scev_Zero ()
 Match an integer 0.
 
cst_pred_ty< is_onem_scev_One ()
 Match an integer 1.
 
cst_pred_ty< is_all_onesm_scev_AllOnes ()
 Match an integer with all bits set.
 
class_match< const SCEVm_SCEV ()
 
class_match< const SCEVConstantm_SCEVConstant ()
 
class_match< const SCEVVScalem_SCEVVScale ()
 
bind_ty< const SCEVm_SCEV (const SCEV *&V)
 Match a SCEV, capturing it if we match.
 
bind_ty< const SCEVConstantm_SCEVConstant (const SCEVConstant *&V)
 
bind_ty< const SCEVUnknownm_SCEVUnknown (const SCEVUnknown *&V)
 
bind_ty< const SCEVAddExprm_scev_Add (const SCEVAddExpr *&V)
 
specificscev_ty m_scev_Specific (const SCEV *S)
 Match if we have a specific specified SCEV.
 
cst_pred_ty< is_specific_cstm_scev_SpecificInt (uint64_t V)
 Match an SCEV constant with a plain unsigned integer.
 
cst_pred_ty< is_specific_signed_cstm_scev_SpecificSInt (int64_t V)
 Match an SCEV constant with a plain signed integer (sign-extended value will be matched)
 
bind_cst_ty m_scev_APInt (const APInt *&C)
 Match an SCEV constant and bind it to an APInt.
 
template<typename SCEVTy , typename Op0_t >
SCEVUnaryExpr_match< SCEVTy, Op0_tm_scev_Unary (const Op0_t &Op0)
 
template<typename Op0_t >
SCEVUnaryExpr_match< SCEVSignExtendExpr, Op0_tm_scev_SExt (const Op0_t &Op0)
 
template<typename Op0_t >
SCEVUnaryExpr_match< SCEVZeroExtendExpr, Op0_tm_scev_ZExt (const Op0_t &Op0)
 
template<typename Op0_t >
SCEVUnaryExpr_match< SCEVPtrToIntExpr, Op0_tm_scev_PtrToInt (const Op0_t &Op0)
 
template<typename SCEVTy , typename Op0_t , typename Op1_t >
SCEVBinaryExpr_match< SCEVTy, Op0_t, Op1_tm_scev_Binary (const Op0_t &Op0, const Op1_t &Op1)
 
template<typename Op0_t , typename Op1_t >
SCEVBinaryExpr_match< SCEVAddExpr, Op0_t, Op1_tm_scev_Add (const Op0_t &Op0, const Op1_t &Op1)
 
template<typename Op0_t , typename Op1_t >
SCEVBinaryExpr_match< SCEVMulExpr, Op0_t, Op1_tm_scev_Mul (const Op0_t &Op0, const Op1_t &Op1)
 
template<typename Op0_t , typename Op1_t >
SCEVBinaryExpr_match< SCEVUDivExpr, Op0_t, Op1_tm_scev_UDiv (const Op0_t &Op0, const Op1_t &Op1)
 
class_match< const Loopm_Loop ()
 
specificloop_ty m_SpecificLoop (const Loop *L)
 
bind_ty< const Loopm_Loop (const Loop *&L)
 
template<typename Op0_t , typename Op1_t >
SCEVAffineAddRec_match< Op0_t, Op1_t, class_match< const Loop > > m_scev_AffineAddRec (const Op0_t &Op0, const Op1_t &Op1)
 
template<typename Op0_t , typename Op1_t , typename Loop_t >
SCEVAffineAddRec_match< Op0_t, Op1_t, Loop_t > m_scev_AffineAddRec (const Op0_t &Op0, const Op1_t &Op1, const Loop_t &L)
 

Function Documentation

◆ m_Loop() [1/2]

class_match< const Loop > llvm::SCEVPatternMatch::m_Loop ( )
inline

◆ m_Loop() [2/2]

bind_ty< const Loop > llvm::SCEVPatternMatch::m_Loop ( const Loop *&  L)
inline

Definition at line 251 of file ScalarEvolutionPatternMatch.h.

◆ m_SCEV() [1/2]

class_match< const SCEV > llvm::SCEVPatternMatch::m_SCEV ( )
inline

◆ m_SCEV() [2/2]

bind_ty< const SCEV > llvm::SCEVPatternMatch::m_SCEV ( const SCEV *&  V)
inline

Match a SCEV, capturing it if we match.

Definition at line 86 of file ScalarEvolutionPatternMatch.h.

◆ m_scev_Add() [1/2]

template<typename Op0_t , typename Op1_t >
SCEVBinaryExpr_match< SCEVAddExpr, Op0_t, Op1_t > llvm::SCEVPatternMatch::m_scev_Add ( const Op0_t Op0,
const Op1_t Op1 
)
inline

Definition at line 208 of file ScalarEvolutionPatternMatch.h.

◆ m_scev_Add() [2/2]

bind_ty< const SCEVAddExpr > llvm::SCEVPatternMatch::m_scev_Add ( const SCEVAddExpr *&  V)
inline

◆ m_scev_AffineAddRec() [1/2]

template<typename Op0_t , typename Op1_t >
SCEVAffineAddRec_match< Op0_t, Op1_t, class_match< const Loop > > llvm::SCEVPatternMatch::m_scev_AffineAddRec ( const Op0_t Op0,
const Op1_t Op1 
)
inline

◆ m_scev_AffineAddRec() [2/2]

template<typename Op0_t , typename Op1_t , typename Loop_t >
SCEVAffineAddRec_match< Op0_t, Op1_t, Loop_t > llvm::SCEVPatternMatch::m_scev_AffineAddRec ( const Op0_t Op0,
const Op1_t Op1,
const Loop_t &  L 
)
inline

Definition at line 262 of file ScalarEvolutionPatternMatch.h.

◆ m_scev_AllOnes()

cst_pred_ty< is_all_ones > llvm::SCEVPatternMatch::m_scev_AllOnes ( )
inline

Match an integer with all bits set.

Definition at line 55 of file ScalarEvolutionPatternMatch.h.

Referenced by llvm::SCEV::isAllOnesValue().

◆ m_scev_APInt()

bind_cst_ty llvm::SCEVPatternMatch::m_scev_APInt ( const APInt *&  C)
inline

◆ m_scev_Binary()

template<typename SCEVTy , typename Op0_t , typename Op1_t >
SCEVBinaryExpr_match< SCEVTy, Op0_t, Op1_t > llvm::SCEVPatternMatch::m_scev_Binary ( const Op0_t Op0,
const Op1_t Op1 
)
inline

Definition at line 202 of file ScalarEvolutionPatternMatch.h.

◆ m_scev_Mul()

template<typename Op0_t , typename Op1_t >
SCEVBinaryExpr_match< SCEVMulExpr, Op0_t, Op1_t > llvm::SCEVPatternMatch::m_scev_Mul ( const Op0_t Op0,
const Op1_t Op1 
)
inline

◆ m_scev_One()

cst_pred_ty< is_one > llvm::SCEVPatternMatch::m_scev_One ( )
inline

Match an integer 1.

Definition at line 48 of file ScalarEvolutionPatternMatch.h.

Referenced by llvm::canPeelLastIteration(), isLoopCounter(), and llvm::SCEV::isOne().

◆ m_scev_PtrToInt()

template<typename Op0_t >
SCEVUnaryExpr_match< SCEVPtrToIntExpr, Op0_t > llvm::SCEVPatternMatch::m_scev_PtrToInt ( const Op0_t Op0)
inline

Definition at line 181 of file ScalarEvolutionPatternMatch.h.

◆ m_scev_SExt()

template<typename Op0_t >
SCEVUnaryExpr_match< SCEVSignExtendExpr, Op0_t > llvm::SCEVPatternMatch::m_scev_SExt ( const Op0_t Op0)
inline

Definition at line 169 of file ScalarEvolutionPatternMatch.h.

Referenced by isKnownPredicateExtendIdiom().

◆ m_scev_Specific()

specificscev_ty llvm::SCEVPatternMatch::m_scev_Specific ( const SCEV S)
inline

Match if we have a specific specified SCEV.

Definition at line 108 of file ScalarEvolutionPatternMatch.h.

Referenced by isKnownPredicateExtendIdiom(), and IsKnownPredicateViaAddRecStart().

◆ m_scev_SpecificInt()

cst_pred_ty< is_specific_cst > llvm::SCEVPatternMatch::m_scev_SpecificInt ( uint64_t  V)
inline

Match an SCEV constant with a plain unsigned integer.

Definition at line 117 of file ScalarEvolutionPatternMatch.h.

Referenced by isBigEndianBitShift().

◆ m_scev_SpecificSInt()

cst_pred_ty< is_specific_signed_cst > llvm::SCEVPatternMatch::m_scev_SpecificSInt ( int64_t  V)
inline

Match an SCEV constant with a plain signed integer (sign-extended value will be matched)

Definition at line 127 of file ScalarEvolutionPatternMatch.h.

Referenced by llvm::LoopVectorizationCostModel::setVectorizedCallDecision().

◆ m_scev_UDiv()

template<typename Op0_t , typename Op1_t >
SCEVBinaryExpr_match< SCEVUDivExpr, Op0_t, Op1_t > llvm::SCEVPatternMatch::m_scev_UDiv ( const Op0_t Op0,
const Op1_t Op1 
)
inline

Definition at line 220 of file ScalarEvolutionPatternMatch.h.

Referenced by isBigEndianBitShift().

◆ m_scev_Unary()

template<typename SCEVTy , typename Op0_t >
SCEVUnaryExpr_match< SCEVTy, Op0_t > llvm::SCEVPatternMatch::m_scev_Unary ( const Op0_t Op0)
inline

Definition at line 163 of file ScalarEvolutionPatternMatch.h.

◆ m_scev_Zero()

cst_pred_ty< is_zero > llvm::SCEVPatternMatch::m_scev_Zero ( )
inline

Match an integer 0.

Definition at line 41 of file ScalarEvolutionPatternMatch.h.

Referenced by llvm::ScalarEvolution::getUDivExpr(), and llvm::SCEV::isZero().

◆ m_scev_ZExt()

template<typename Op0_t >
SCEVUnaryExpr_match< SCEVZeroExtendExpr, Op0_t > llvm::SCEVPatternMatch::m_scev_ZExt ( const Op0_t Op0)
inline

◆ m_SCEVConstant() [1/2]

class_match< const SCEVConstant > llvm::SCEVPatternMatch::m_SCEVConstant ( )
inline

Definition at line 64 of file ScalarEvolutionPatternMatch.h.

Referenced by CollectSubexprs(), and mayUsePostIncMode().

◆ m_SCEVConstant() [2/2]

bind_ty< const SCEVConstant > llvm::SCEVPatternMatch::m_SCEVConstant ( const SCEVConstant *&  V)
inline

Definition at line 87 of file ScalarEvolutionPatternMatch.h.

◆ m_SCEVUnknown()

bind_ty< const SCEVUnknown > llvm::SCEVPatternMatch::m_SCEVUnknown ( const SCEVUnknown *&  V)
inline

Definition at line 90 of file ScalarEvolutionPatternMatch.h.

◆ m_SCEVVScale()

class_match< const SCEVVScale > llvm::SCEVPatternMatch::m_SCEVVScale ( )
inline

◆ m_SpecificLoop()

specificloop_ty llvm::SCEVPatternMatch::m_SpecificLoop ( const Loop L)
inline

◆ match()

template<typename Pattern >
bool llvm::SCEVPatternMatch::match ( const SCEV S,
const Pattern P 
)