LLVM 20.0.0git
Functions
IRMutator.cpp File Reference
#include "llvm/FuzzMutate/IRMutator.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Bitcode/BitcodeReader.h"
#include "llvm/Bitcode/BitcodeWriter.h"
#include "llvm/FuzzMutate/Operations.h"
#include "llvm/FuzzMutate/Random.h"
#include "llvm/FuzzMutate/RandomIRBuilder.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/FMF.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/PassInstrumentation.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Transforms/Scalar/DCE.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include <map>
#include <optional>

Go to the source code of this file.

Functions

static void eliminateDeadCode (Function &F)
 
static iterator_range< BasicBlock::iteratorgetInsertionRange (BasicBlock &BB)
 
static uint64_t getUniqueCaseValue (SmallSet< uint64_t, 4 > &CasesTaken, uint64_t MaxValue, RandomIRBuilder &IB)
 Return a case value that is not already taken to make sure we don't have two cases with same value.
 

Function Documentation

◆ eliminateDeadCode()

static void eliminateDeadCode ( Function F)
static

◆ getInsertionRange()

static iterator_range< BasicBlock::iterator > getInsertionRange ( BasicBlock BB)
inlinestatic

◆ getUniqueCaseValue()

static uint64_t getUniqueCaseValue ( SmallSet< uint64_t, 4 > &  CasesTaken,
uint64_t  MaxValue,
RandomIRBuilder IB 
)
static

Return a case value that is not already taken to make sure we don't have two cases with same value.

Definition at line 350 of file IRMutator.cpp.

References llvm::SmallSet< T, N, C >::count(), and llvm::SmallSet< T, N, C >::insert().

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