LLVM 22.0.0git
llvm::InsertPHIStrategy Class Reference

Strategy to insert PHI Nodes at the head of each basic block. More...

#include "llvm/FuzzMutate/IRMutator.h"

Inheritance diagram for llvm::InsertPHIStrategy:
[legend]

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 (BasicBlock &BB, RandomIRBuilder &IB) override
Public Member Functions inherited from llvm::IRMutationStrategy
virtual ~IRMutationStrategy ()=default
virtual void mutate (Module &M, RandomIRBuilder &IB)
virtual void mutate (Function &F, RandomIRBuilder &IB)
virtual void mutate (Instruction &I, RandomIRBuilder &IB)

Detailed Description

Strategy to insert PHI Nodes at the head of each basic block.

Definition at line 170 of file IRMutator.h.

Member Function Documentation

◆ getWeight()

uint64_t llvm::InsertPHIStrategy::getWeight ( size_t CurrentSize,
size_t MaxSize,
uint64_t CurrentWeight )
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 172 of file IRMutator.h.

◆ mutate()


The documentation for this class was generated from the following files: