LLVM 24.0.0git
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 anyIntOrVecIntType ()
static SourcePred boolOrVecBoolType ()
static SourcePred anyFloatType ()
static SourcePred anyFloatOrVecFloatType ()
static SourcePred anyPtrType ()
static SourcePred sizedPtrType ()
static SourcePred matchFirstLengthWAnyType ()
static SourcePred matchSecondType ()
 Match values that have the same type as the first source.
static SourcePred anyAggregateType ()
static SourcePred anyVectorType ()
static SourcePred matchFirstType ()
 Match values that have the same type as the first source.
static SourcePred matchScalarOfFirstType ()
 Match values that have the first source's scalar type.
LLVM_ABI void makeConstantsWithType (Type *T, std::vector< Constant * > &Cs)
LLVM_ABI std::vector< Constant * > makeConstantsWithType (Type *T)
LLVM_ABI OpDescriptor selectDescriptor (unsigned Weight)
 Descriptors for individual operations.
LLVM_ABI OpDescriptor fnegDescriptor (unsigned Weight)
LLVM_ABI OpDescriptor binOpDescriptor (unsigned Weight, Instruction::BinaryOps Op)
LLVM_ABI OpDescriptor cmpOpDescriptor (unsigned Weight, Instruction::OtherOps CmpOp, CmpInst::Predicate Pred)
LLVM_ABI OpDescriptor splitBlockDescriptor (unsigned Weight)
LLVM_ABI OpDescriptor gepDescriptor (unsigned Weight)
LLVM_ABI OpDescriptor extractValueDescriptor (unsigned Weight)
LLVM_ABI OpDescriptor insertValueDescriptor (unsigned Weight)
LLVM_ABI OpDescriptor extractElementDescriptor (unsigned Weight)
LLVM_ABI OpDescriptor insertElementDescriptor (unsigned Weight)
LLVM_ABI OpDescriptor shuffleVectorDescriptor (unsigned Weight)

Function Documentation

◆ anyAggregateType()

SourcePred llvm::fuzzerop::anyAggregateType ( )
inlinestatic

Definition at line 235 of file OpDescriptor.h.

References Find(), llvm::isa(), Pred, and V.

Referenced by extractValueDescriptor(), and insertValueDescriptor().

◆ anyFloatOrVecFloatType()

SourcePred llvm::fuzzerop::anyFloatOrVecFloatType ( )
inlinestatic

Definition at line 143 of file OpDescriptor.h.

References Pred, and V.

Referenced by binOpDescriptor(), cmpOpDescriptor(), and fnegDescriptor().

◆ anyFloatType()

SourcePred llvm::fuzzerop::anyFloatType ( )
inlinestatic

Definition at line 135 of file OpDescriptor.h.

References Pred, and V.

◆ anyIntOrVecIntType()

SourcePred llvm::fuzzerop::anyIntOrVecIntType ( )
inlinestatic

Definition at line 121 of file OpDescriptor.h.

References Pred, and V.

Referenced by binOpDescriptor(), and cmpOpDescriptor().

◆ anyIntType()

SourcePred llvm::fuzzerop::anyIntType ( )
inlinestatic

Definition at line 113 of file OpDescriptor.h.

References Pred, and V.

Referenced by extractElementDescriptor(), gepDescriptor(), and insertElementDescriptor().

◆ anyPtrType()

SourcePred llvm::fuzzerop::anyPtrType ( )
inlinestatic

Definition at line 150 of file OpDescriptor.h.

References llvm::PoisonValue::get(), llvm::PointerType::getUnqual(), Pred, T, and V.

◆ anyType()

SourcePred llvm::fuzzerop::anyType ( )
inlinestatic

Definition at line 105 of file OpDescriptor.h.

References Pred, and V.

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

◆ anyVectorType()

SourcePred llvm::fuzzerop::anyVectorType ( )
inlinestatic

Definition at line 253 of file OpDescriptor.h.

References Pred, and V.

Referenced by extractElementDescriptor(), insertElementDescriptor(), and shuffleVectorDescriptor().

◆ binOpDescriptor()

◆ boolOrVecBoolType()

SourcePred llvm::fuzzerop::boolOrVecBoolType ( )
inlinestatic

Definition at line 128 of file OpDescriptor.h.

References Pred, and V.

Referenced by selectDescriptor().

◆ cmpOpDescriptor()

◆ extractElementDescriptor()

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

◆ extractValueDescriptor()

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

◆ fnegDescriptor()

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

◆ gepDescriptor()

◆ insertElementDescriptor()

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

◆ insertValueDescriptor()

◆ makeConstantsWithType() [1/2]

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

Definition at line 50 of file OpDescriptor.cpp.

References makeConstantsWithType(), and T.

◆ makeConstantsWithType() [2/2]

◆ matchFirstLengthWAnyType()

◆ matchFirstType()

SourcePred llvm::fuzzerop::matchFirstType ( )
inlinestatic

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

Definition at line 265 of file OpDescriptor.h.

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

Referenced by binOpDescriptor(), cmpOpDescriptor(), and shuffleVectorDescriptor().

◆ matchScalarOfFirstType()

SourcePred llvm::fuzzerop::matchScalarOfFirstType ( )
inlinestatic

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

Definition at line 278 of file OpDescriptor.h.

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

Referenced by insertElementDescriptor().

◆ matchSecondType()

SourcePred llvm::fuzzerop::matchSecondType ( )
inlinestatic

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

Definition at line 223 of file OpDescriptor.h.

References assert(), getType(), makeConstantsWithType(), Pred, llvm::ArrayRef< T >::size(), and V.

Referenced by selectDescriptor().

◆ onlyType()

◆ selectDescriptor()

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

Descriptors for individual operations.

Definition at line 100 of file Operations.cpp.

References boolOrVecBoolType(), llvm::SelectInst::Create(), InsertPt, matchFirstLengthWAnyType(), and matchSecondType().

Referenced by llvm::describeFuzzerOtherOps().

◆ shuffleVectorDescriptor()

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

◆ sizedPtrType()

SourcePred llvm::fuzzerop::sizedPtrType ( )
inlinestatic

Definition at line 165 of file OpDescriptor.h.

References llvm::PoisonValue::get(), llvm::PointerType::getUnqual(), Pred, T, and V.

Referenced by gepDescriptor().

◆ splitBlockDescriptor()

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