LLVM API Documentation
#include "llvm/IR/CallSite.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Operator.h"
Go to the source code of this file.
Classes | |
struct | llvm::PatternMatch::OneUse_match< SubPattern_t > |
struct | llvm::PatternMatch::class_match< Class > |
struct | llvm::PatternMatch::match_combine_or< LTy, RTy > |
Matching combinators. More... | |
struct | llvm::PatternMatch::match_combine_and< LTy, RTy > |
struct | llvm::PatternMatch::match_zero |
struct | llvm::PatternMatch::match_neg_zero |
struct | llvm::PatternMatch::apint_match |
struct | llvm::PatternMatch::constantint_match< Val > |
struct | llvm::PatternMatch::cst_pred_ty< Predicate > |
struct | llvm::PatternMatch::api_pred_ty< Predicate > |
struct | llvm::PatternMatch::is_one |
struct | llvm::PatternMatch::is_all_ones |
struct | llvm::PatternMatch::is_sign_bit |
struct | llvm::PatternMatch::is_power2 |
struct | llvm::PatternMatch::bind_ty< Class > |
struct | llvm::PatternMatch::specificval_ty |
specificval_ty - Match a specified Value*. More... | |
struct | llvm::PatternMatch::specific_fpval |
struct | llvm::PatternMatch::bind_const_intval_ty |
struct | llvm::PatternMatch::specific_intval |
Match a specified integer value or vector of all elements of that value. More... | |
struct | llvm::PatternMatch::BinaryOp_match< LHS_t, RHS_t, Opcode > |
struct | llvm::PatternMatch::OverflowingBinaryOp_match< LHS_t, RHS_t, Opcode, WrapFlags > |
struct | llvm::PatternMatch::BinOp2_match< LHS_t, RHS_t, Opc1, Opc2 > |
struct | llvm::PatternMatch::Exact_match< SubPattern_t > |
struct | llvm::PatternMatch::CmpClass_match< LHS_t, RHS_t, Class, PredicateTy > |
struct | llvm::PatternMatch::SelectClass_match< Cond_t, LHS_t, RHS_t > |
struct | llvm::PatternMatch::CastClass_match< Op_t, Opcode > |
struct | llvm::PatternMatch::not_match< LHS_t > |
struct | llvm::PatternMatch::neg_match< LHS_t > |
struct | llvm::PatternMatch::fneg_match< LHS_t > |
struct | llvm::PatternMatch::br_match |
struct | llvm::PatternMatch::brc_match< Cond_t > |
struct | llvm::PatternMatch::MaxMin_match< CmpInst_t, LHS_t, RHS_t, Pred_t > |
struct | llvm::PatternMatch::smax_pred_ty |
smax_pred_ty - Helper class for identifying signed max predicates. More... | |
struct | llvm::PatternMatch::smin_pred_ty |
smin_pred_ty - Helper class for identifying signed min predicates. More... | |
struct | llvm::PatternMatch::umax_pred_ty |
umax_pred_ty - Helper class for identifying unsigned max predicates. More... | |
struct | llvm::PatternMatch::umin_pred_ty |
umin_pred_ty - Helper class for identifying unsigned min predicates. More... | |
struct | llvm::PatternMatch::ofmax_pred_ty |
ofmax_pred_ty - Helper class for identifying ordered max predicates. More... | |
struct | llvm::PatternMatch::ofmin_pred_ty |
ofmin_pred_ty - Helper class for identifying ordered min predicates. More... | |
struct | llvm::PatternMatch::ufmax_pred_ty |
ufmax_pred_ty - Helper class for identifying unordered max predicates. More... | |
struct | llvm::PatternMatch::ufmin_pred_ty |
ufmin_pred_ty - Helper class for identifying unordered min predicates. More... | |
struct | llvm::PatternMatch::Argument_match< Opnd_t > |
struct | llvm::PatternMatch::IntrinsicID_match |
Intrinsic matchers. More... | |
struct | llvm::PatternMatch::m_Intrinsic_Ty< T0 > |
struct | llvm::PatternMatch::m_Intrinsic_Ty< T0, T1 > |
struct | llvm::PatternMatch::m_Intrinsic_Ty< T0, T1, T2 > |
struct | llvm::PatternMatch::m_Intrinsic_Ty< T0, T1, T2, T3 > |
Namespaces | |
namespace | llvm |
List of target independent CodeGen pass IDs. | |
namespace | llvm::PatternMatch |
Functions | |
template<typename Val , typename Pattern > | |
bool | llvm::PatternMatch::match (Val *V, const Pattern &P) |
template<typename T > | |
OneUse_match< T > | llvm::PatternMatch::m_OneUse (const T &SubPattern) |
class_match< Value > | llvm::PatternMatch::m_Value () |
m_Value() - Match an arbitrary value and ignore it. | |
class_match< ConstantInt > | llvm::PatternMatch::m_ConstantInt () |
m_ConstantInt() - Match an arbitrary ConstantInt and ignore it. | |
class_match< UndefValue > | llvm::PatternMatch::m_Undef () |
m_Undef() - Match an arbitrary undef constant. | |
class_match< Constant > | llvm::PatternMatch::m_Constant () |
template<typename LTy , typename RTy > | |
match_combine_or< LTy, RTy > | llvm::PatternMatch::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 > | llvm::PatternMatch::m_CombineAnd (const LTy &L, const RTy &R) |
Combine two pattern matchers matching L && R. | |
match_zero | llvm::PatternMatch::m_Zero () |
match_neg_zero | llvm::PatternMatch::m_NegZero () |
match_combine_or< match_zero, match_neg_zero > | llvm::PatternMatch::m_AnyZero () |
apint_match | llvm::PatternMatch::m_APInt (const APInt *&Res) |
cst_pred_ty< is_one > | llvm::PatternMatch::m_One () |
m_One() - Match an integer 1 or a vector with all elements equal to 1. | |
api_pred_ty< is_one > | llvm::PatternMatch::m_One (const APInt *&V) |
cst_pred_ty< is_all_ones > | llvm::PatternMatch::m_AllOnes () |
m_AllOnes() - Match an integer or vector with all bits set to true. | |
api_pred_ty< is_all_ones > | llvm::PatternMatch::m_AllOnes (const APInt *&V) |
cst_pred_ty< is_sign_bit > | llvm::PatternMatch::m_SignBit () |
m_SignBit() - Match an integer or vector with only the sign bit(s) set. | |
api_pred_ty< is_sign_bit > | llvm::PatternMatch::m_SignBit (const APInt *&V) |
cst_pred_ty< is_power2 > | llvm::PatternMatch::m_Power2 () |
m_Power2() - Match an integer or vector power of 2. | |
api_pred_ty< is_power2 > | llvm::PatternMatch::m_Power2 (const APInt *&V) |
bind_ty< Value > | llvm::PatternMatch::m_Value (Value *&V) |
m_Value - Match a value, capturing it if we match. | |
bind_ty< ConstantInt > | llvm::PatternMatch::m_ConstantInt (ConstantInt *&CI) |
m_ConstantInt - Match a ConstantInt, capturing the value if we match. | |
bind_ty< Constant > | llvm::PatternMatch::m_Constant (Constant *&C) |
m_Constant - Match a Constant, capturing the value if we match. | |
bind_ty< ConstantFP > | llvm::PatternMatch::m_ConstantFP (ConstantFP *&C) |
m_ConstantFP - Match a ConstantFP, capturing the value if we match. | |
specificval_ty | llvm::PatternMatch::m_Specific (const Value *V) |
m_Specific - Match if we have a specific specified value. | |
specific_fpval | llvm::PatternMatch::m_SpecificFP (double V) |
specific_fpval | llvm::PatternMatch::m_FPOne () |
Match a float 1.0 or vector with all elements equal to 1.0. | |
specific_intval | llvm::PatternMatch::m_SpecificInt (uint64_t V) |
bind_const_intval_ty | llvm::PatternMatch::m_ConstantInt (uint64_t &V) |
template<typename LHS , typename RHS > | |
BinaryOp_match< LHS, RHS, Instruction::Add > | llvm::PatternMatch::m_Add (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
BinaryOp_match< LHS, RHS, Instruction::FAdd > | llvm::PatternMatch::m_FAdd (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
BinaryOp_match< LHS, RHS, Instruction::Sub > | llvm::PatternMatch::m_Sub (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
BinaryOp_match< LHS, RHS, Instruction::FSub > | llvm::PatternMatch::m_FSub (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
BinaryOp_match< LHS, RHS, Instruction::Mul > | llvm::PatternMatch::m_Mul (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
BinaryOp_match< LHS, RHS, Instruction::FMul > | llvm::PatternMatch::m_FMul (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
BinaryOp_match< LHS, RHS, Instruction::UDiv > | llvm::PatternMatch::m_UDiv (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
BinaryOp_match< LHS, RHS, Instruction::SDiv > | llvm::PatternMatch::m_SDiv (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
BinaryOp_match< LHS, RHS, Instruction::FDiv > | llvm::PatternMatch::m_FDiv (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
BinaryOp_match< LHS, RHS, Instruction::URem > | llvm::PatternMatch::m_URem (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
BinaryOp_match< LHS, RHS, Instruction::SRem > | llvm::PatternMatch::m_SRem (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
BinaryOp_match< LHS, RHS, Instruction::FRem > | llvm::PatternMatch::m_FRem (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
BinaryOp_match< LHS, RHS, Instruction::And > | llvm::PatternMatch::m_And (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
BinaryOp_match< LHS, RHS, Instruction::Or > | llvm::PatternMatch::m_Or (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
BinaryOp_match< LHS, RHS, Instruction::Xor > | llvm::PatternMatch::m_Xor (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
BinaryOp_match< LHS, RHS, Instruction::Shl > | llvm::PatternMatch::m_Shl (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
BinaryOp_match< LHS, RHS, Instruction::LShr > | llvm::PatternMatch::m_LShr (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
BinaryOp_match< LHS, RHS, Instruction::AShr > | llvm::PatternMatch::m_AShr (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
OverflowingBinaryOp_match< LHS, RHS, Instruction::Add, OverflowingBinaryOperator::NoSignedWrap > | llvm::PatternMatch::m_NSWAdd (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
OverflowingBinaryOp_match< LHS, RHS, Instruction::Sub, OverflowingBinaryOperator::NoSignedWrap > | llvm::PatternMatch::m_NSWSub (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
OverflowingBinaryOp_match< LHS, RHS, Instruction::Mul, OverflowingBinaryOperator::NoSignedWrap > | llvm::PatternMatch::m_NSWMul (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
OverflowingBinaryOp_match< LHS, RHS, Instruction::Shl, OverflowingBinaryOperator::NoSignedWrap > | llvm::PatternMatch::m_NSWShl (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
OverflowingBinaryOp_match< LHS, RHS, Instruction::Add, OverflowingBinaryOperator::NoUnsignedWrap > | llvm::PatternMatch::m_NUWAdd (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
OverflowingBinaryOp_match< LHS, RHS, Instruction::Sub, OverflowingBinaryOperator::NoUnsignedWrap > | llvm::PatternMatch::m_NUWSub (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
OverflowingBinaryOp_match< LHS, RHS, Instruction::Mul, OverflowingBinaryOperator::NoUnsignedWrap > | llvm::PatternMatch::m_NUWMul (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
OverflowingBinaryOp_match< LHS, RHS, Instruction::Shl, OverflowingBinaryOperator::NoUnsignedWrap > | llvm::PatternMatch::m_NUWShl (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
BinOp2_match< LHS, RHS, Instruction::LShr, Instruction::AShr > | llvm::PatternMatch::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 > | llvm::PatternMatch::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 > | llvm::PatternMatch::m_IDiv (const LHS &L, const RHS &R) |
m_IDiv - Matches UDiv and SDiv. | |
template<typename T > | |
Exact_match< T > | llvm::PatternMatch::m_Exact (const T &SubPattern) |
template<typename LHS , typename RHS > | |
CmpClass_match< LHS, RHS, ICmpInst, ICmpInst::Predicate > | llvm::PatternMatch::m_ICmp (ICmpInst::Predicate &Pred, const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
CmpClass_match< LHS, RHS, FCmpInst, FCmpInst::Predicate > | llvm::PatternMatch::m_FCmp (FCmpInst::Predicate &Pred, const LHS &L, const RHS &R) |
template<typename Cond , typename LHS , typename RHS > | |
SelectClass_match< Cond, LHS, RHS > | llvm::PatternMatch::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 > > | llvm::PatternMatch::m_SelectCst (const Cond &C) |
template<typename OpTy > | |
CastClass_match< OpTy, Instruction::BitCast > | llvm::PatternMatch::m_BitCast (const OpTy &Op) |
m_BitCast | |
template<typename OpTy > | |
CastClass_match< OpTy, Instruction::PtrToInt > | llvm::PatternMatch::m_PtrToInt (const OpTy &Op) |
m_PtrToInt | |
template<typename OpTy > | |
CastClass_match< OpTy, Instruction::Trunc > | llvm::PatternMatch::m_Trunc (const OpTy &Op) |
m_Trunc | |
template<typename OpTy > | |
CastClass_match< OpTy, Instruction::SExt > | llvm::PatternMatch::m_SExt (const OpTy &Op) |
m_SExt | |
template<typename OpTy > | |
CastClass_match< OpTy, Instruction::ZExt > | llvm::PatternMatch::m_ZExt (const OpTy &Op) |
m_ZExt | |
template<typename OpTy > | |
CastClass_match< OpTy, Instruction::UIToFP > | llvm::PatternMatch::m_UIToFP (const OpTy &Op) |
m_UIToFP | |
template<typename OpTy > | |
CastClass_match< OpTy, Instruction::SIToFP > | llvm::PatternMatch::m_SIToFP (const OpTy &Op) |
m_SIToFP | |
template<typename LHS > | |
not_match< LHS > | llvm::PatternMatch::m_Not (const LHS &L) |
template<typename LHS > | |
neg_match< LHS > | llvm::PatternMatch::m_Neg (const LHS &L) |
m_Neg - Match an integer negate. | |
template<typename LHS > | |
fneg_match< LHS > | llvm::PatternMatch::m_FNeg (const LHS &L) |
m_FNeg - Match a floating point negate. | |
br_match | llvm::PatternMatch::m_UnconditionalBr (BasicBlock *&Succ) |
template<typename Cond_t > | |
brc_match< Cond_t > | llvm::PatternMatch::m_Br (const Cond_t &C, BasicBlock *&T, BasicBlock *&F) |
template<typename LHS , typename RHS > | |
MaxMin_match< ICmpInst, LHS, RHS, smax_pred_ty > | llvm::PatternMatch::m_SMax (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
MaxMin_match< ICmpInst, LHS, RHS, smin_pred_ty > | llvm::PatternMatch::m_SMin (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
MaxMin_match< ICmpInst, LHS, RHS, umax_pred_ty > | llvm::PatternMatch::m_UMax (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
MaxMin_match< ICmpInst, LHS, RHS, umin_pred_ty > | llvm::PatternMatch::m_UMin (const LHS &L, const RHS &R) |
template<typename LHS , typename RHS > | |
MaxMin_match< FCmpInst, LHS, RHS, ofmax_pred_ty > | llvm::PatternMatch::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 > | llvm::PatternMatch::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 > | llvm::PatternMatch::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 > | llvm::PatternMatch::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 > | llvm::PatternMatch::m_Argument (const Opnd_t &Op) |
Match an argument. | |
template<Intrinsic::ID IntrID> | |
IntrinsicID_match | llvm::PatternMatch::m_Intrinsic () |
template<Intrinsic::ID IntrID, typename T0 > | |
m_Intrinsic_Ty< T0 >::Ty | llvm::PatternMatch::m_Intrinsic (const T0 &Op0) |
template<Intrinsic::ID IntrID, typename T0 , typename T1 > | |
m_Intrinsic_Ty< T0, T1 >::Ty | llvm::PatternMatch::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 | llvm::PatternMatch::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 | llvm::PatternMatch::m_Intrinsic (const T0 &Op0, const T1 &Op1, const T2 &Op2, const T3 &Op3) |
template<typename Opnd0 > | |
m_Intrinsic_Ty< Opnd0 >::Ty | llvm::PatternMatch::m_BSwap (const Opnd0 &Op0) |