LLVM  8.0.1
Classes | Functions
llvm::fuzzerop Namespace Reference

Classes

struct  OpDescriptor
 A description of some operation we can build while fuzzing IR. More...
 
class  SourcePred
 A matcher/generator for finding suitable values for the next source in an operation's partially completed argument list. More...
 

Functions

static SourcePred onlyType (Type *Only)
 
static SourcePred anyType ()
 
static SourcePred anyIntType ()
 
static SourcePred anyFloatType ()
 
static SourcePred anyPtrType ()
 
static SourcePred sizedPtrType ()
 
static SourcePred anyAggregateType ()
 
static SourcePred anyVectorType ()
 
static SourcePred matchFirstType ()
 Match values that have the same type as the first source. More...
 
static SourcePred matchScalarOfFirstType ()
 Match values that have the first source's scalar type. More...
 
void makeConstantsWithType (Type *T, std::vector< Constant *> &Cs)
 
std::vector< Constant * > makeConstantsWithType (Type *T)
 
OpDescriptor binOpDescriptor (unsigned Weight, Instruction::BinaryOps Op)
 Descriptors for individual operations. More...
 
OpDescriptor cmpOpDescriptor (unsigned Weight, Instruction::OtherOps CmpOp, CmpInst::Predicate Pred)
 
OpDescriptor splitBlockDescriptor (unsigned Weight)
 
OpDescriptor gepDescriptor (unsigned Weight)
 
OpDescriptor extractValueDescriptor (unsigned Weight)
 
OpDescriptor insertValueDescriptor (unsigned Weight)
 
OpDescriptor extractElementDescriptor (unsigned Weight)
 
OpDescriptor insertElementDescriptor (unsigned Weight)
 
OpDescriptor shuffleVectorDescriptor (unsigned Weight)
 

Function Documentation

◆ anyAggregateType()

static SourcePred llvm::fuzzerop::anyAggregateType ( )
inlinestatic

Definition at line 165 of file OpDescriptor.h.

References Find(), and llvm::None.

Referenced by extractValueDescriptor(), and insertValueDescriptor().

◆ anyFloatType()

static SourcePred llvm::fuzzerop::anyFloatType ( )
inlinestatic

Definition at line 122 of file OpDescriptor.h.

References llvm::None.

Referenced by binOpDescriptor(), and cmpOpDescriptor().

◆ anyIntType()

static SourcePred llvm::fuzzerop::anyIntType ( )
inlinestatic

◆ anyPtrType()

static SourcePred llvm::fuzzerop::anyPtrType ( )
inlinestatic

Definition at line 130 of file OpDescriptor.h.

References llvm::UndefValue::get(), and llvm::PointerType::getUnqual().

◆ anyType()

static SourcePred llvm::fuzzerop::anyType ( )
inlinestatic

Definition at line 106 of file OpDescriptor.h.

References llvm::None.

Referenced by llvm::RandomIRBuilder::findOrCreateSource().

◆ anyVectorType()

static SourcePred llvm::fuzzerop::anyVectorType ( )
inlinestatic

◆ binOpDescriptor()

OpDescriptor llvm::fuzzerop::binOpDescriptor ( unsigned  Weight,
Instruction::BinaryOps  Op 
)

Descriptors for individual operations.

Definition at line 92 of file Operations.cpp.

References llvm::MCID::Add, anyFloatType(), anyIntType(), llvm::BinaryOperator::Create(), llvm_unreachable, and matchFirstType().

Referenced by llvm::describeFuzzerFloatOps(), and llvm::describeFuzzerIntOps().

◆ cmpOpDescriptor()

OpDescriptor llvm::fuzzerop::cmpOpDescriptor ( unsigned  Weight,
Instruction::OtherOps  CmpOp,
CmpInst::Predicate  Pred 
)

◆ extractElementDescriptor()

OpDescriptor llvm::fuzzerop::extractElementDescriptor ( unsigned  Weight)

◆ extractValueDescriptor()

OpDescriptor llvm::fuzzerop::extractValueDescriptor ( unsigned  Weight)

◆ gepDescriptor()

OpDescriptor llvm::fuzzerop::gepDescriptor ( unsigned  Weight)

◆ insertElementDescriptor()

OpDescriptor llvm::fuzzerop::insertElementDescriptor ( unsigned  Weight)

◆ insertValueDescriptor()

OpDescriptor llvm::fuzzerop::insertValueDescriptor ( unsigned  Weight)

◆ makeConstantsWithType() [1/2]

void llvm::fuzzerop::makeConstantsWithType ( Type T,
std::vector< Constant *> &  Cs 
)

◆ makeConstantsWithType() [2/2]

std::vector< Constant * > llvm::fuzzerop::makeConstantsWithType ( Type T)

Definition at line 34 of file OpDescriptor.cpp.

References makeConstantsWithType().

◆ matchFirstType()

static SourcePred llvm::fuzzerop::matchFirstType ( )
inlinestatic

Match values that have the same type as the first source.

Definition at line 195 of file OpDescriptor.h.

References assert(), llvm::ArrayRef< T >::empty(), getType(), and makeConstantsWithType().

Referenced by binOpDescriptor(), cmpOpDescriptor(), llvm::RandomIRBuilder::newSink(), and shuffleVectorDescriptor().

◆ matchScalarOfFirstType()

static SourcePred llvm::fuzzerop::matchScalarOfFirstType ( )
inlinestatic

Match values that have the first source's scalar type.

Definition at line 208 of file OpDescriptor.h.

References assert(), llvm::ArrayRef< T >::empty(), getType(), and makeConstantsWithType().

Referenced by insertElementDescriptor().

◆ onlyType()

static SourcePred llvm::fuzzerop::onlyType ( Type Only)
inlinestatic

Definition at line 96 of file OpDescriptor.h.

References makeConstantsWithType().

Referenced by llvm::InstDeleterIRStrategy::mutate().

◆ shuffleVectorDescriptor()

OpDescriptor llvm::fuzzerop::shuffleVectorDescriptor ( unsigned  Weight)

◆ sizedPtrType()

static SourcePred llvm::fuzzerop::sizedPtrType ( )
inlinestatic

◆ splitBlockDescriptor()

OpDescriptor llvm::fuzzerop::splitBlockDescriptor ( unsigned  Weight)