LLVM 20.0.0git
|
Strategy to select a random instruction and add a new sink (user) to it to increate data dependency. More...
#include "llvm/FuzzMutate/IRMutator.h"
Public Member Functions | |
uint64_t | getWeight (size_t CurrentSize, size_t MaxSize, uint64_t CurrentWeight) override |
Provide a weight to bias towards choosing this strategy for a mutation. | |
void | mutate (Function &F, RandomIRBuilder &IB) override |
void | mutate (BasicBlock &BB, RandomIRBuilder &IB) override |
Public Member Functions inherited from llvm::IRMutationStrategy | |
virtual | ~IRMutationStrategy ()=default |
virtual uint64_t | getWeight (size_t CurrentSize, size_t MaxSize, uint64_t CurrentWeight)=0 |
Provide a weight to bias towards choosing this strategy for a mutation. | |
virtual void | mutate (Module &M, RandomIRBuilder &IB) |
virtual void | mutate (Instruction &I, RandomIRBuilder &IB) |
Strategy to select a random instruction and add a new sink (user) to it to increate data dependency.
Definition at line 181 of file IRMutator.h.
|
inlineoverridevirtual |
Provide a weight to bias towards choosing this strategy for a mutation.
The value of the weight is arbitrary, but a good default is "the number of
distinct ways in which this strategy can mutate a unit". This can also be used to prefer strategies that shrink the overall size of the result when we start getting close to MaxSize
.
Implements llvm::IRMutationStrategy.
Definition at line 183 of file IRMutator.h.
|
overridevirtual |
Reimplemented from llvm::IRMutationStrategy.
Definition at line 575 of file IRMutator.cpp.
References getInsertionRange(), llvm::Value::getType(), I, Idx, llvm::Type::isTokenTy(), llvm::Type::isVoidTy(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SmallVectorBase< Size_T >::size(), and llvm::ArrayRef< T >::slice().
|
overridevirtual |
Reimplemented from llvm::IRMutationStrategy.
Definition at line 570 of file IRMutator.cpp.
Referenced by mutate().