#include "llvm/FuzzMutate/RandomIRBuilder.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/FuzzMutate/OpDescriptor.h"
#include "llvm/FuzzMutate/Random.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Module.h"
usingnamespacellvm;
usingnamespacefuzzerop;
static std::vector<BasicBlock *> getDominators(BasicBlock *BB) { … }
static std::vector<BasicBlock *> getDominatees(BasicBlock *BB) { … }
AllocaInst *RandomIRBuilder::createStackMemory(Function *F, Type *Ty,
Value *Init) { … }
std::pair<GlobalVariable *, bool>
RandomIRBuilder::findOrCreateGlobalVariable(Module *M, ArrayRef<Value *> Srcs,
fuzzerop::SourcePred Pred) { … }
Value *RandomIRBuilder::findOrCreateSource(BasicBlock &BB,
ArrayRef<Instruction *> Insts) { … }
Value *RandomIRBuilder::findOrCreateSource(BasicBlock &BB,
ArrayRef<Instruction *> Insts,
ArrayRef<Value *> Srcs,
SourcePred Pred,
bool allowConstant) { … }
Value *RandomIRBuilder::newSource(BasicBlock &BB, ArrayRef<Instruction *> Insts,
ArrayRef<Value *> Srcs, SourcePred Pred,
bool allowConstant) { … }
static bool isCompatibleReplacement(const Instruction *I, const Use &Operand,
const Value *Replacement) { … }
Instruction *RandomIRBuilder::connectToSink(BasicBlock &BB,
ArrayRef<Instruction *> Insts,
Value *V) { … }
Instruction *RandomIRBuilder::newSink(BasicBlock &BB,
ArrayRef<Instruction *> Insts, Value *V) { … }
Value *RandomIRBuilder::findPointer(BasicBlock &BB,
ArrayRef<Instruction *> Insts) { … }
Type *RandomIRBuilder::randomType() { … }
Function *RandomIRBuilder::createFunctionDeclaration(Module &M,
uint64_t ArgNum) { … }
Function *RandomIRBuilder::createFunctionDeclaration(Module &M) { … }
Function *RandomIRBuilder::createFunctionDefinition(Module &M,
uint64_t ArgNum) { … }
Function *RandomIRBuilder::createFunctionDefinition(Module &M) { … }