ΒΆvoid CloneFunctionInto(
llvm::Function* NewFunc,
const llvm::Function* OldFunc,
llvm::ValueToValueMapTy& VMap,
bool ModuleLevelChanges,
SmallVectorImpl<llvm::ReturnInst*>& Returns,
const char* NameSuffix = "",
llvm::ClonedCodeInfo* CodeInfo = nullptr,
llvm::ValueMapTypeRemapper* TypeMapper =
nullptr,
llvm::ValueMaterializer* Materializer =
nullptr)
void CloneFunctionInto(
llvm::Function* NewFunc,
const llvm::Function* OldFunc,
llvm::ValueToValueMapTy& VMap,
bool ModuleLevelChanges,
SmallVectorImpl<llvm::ReturnInst*>& Returns,
const char* NameSuffix = "",
llvm::ClonedCodeInfo* CodeInfo = nullptr,
llvm::ValueMapTypeRemapper* TypeMapper =
nullptr,
llvm::ValueMaterializer* Materializer =
nullptr)
Description
Clone OldFunc into NewFunc, transforming the old arguments into references to VMap values. Note that if NewFunc already has basic blocks, the ones cloned into it will be added to the end of the function. This function fills in a list of return instructions, and can optionally remap types and/or append the specified suffix to all values cloned. If ModuleLevelChanges is false, VMap contains no non-identity GlobalValue mappings.
Declared at: llvm/include/llvm/Transforms/Utils/Cloning.h:138
Parameters
- llvm::Function* NewFunc
- const llvm::Function* OldFunc
- llvm::ValueToValueMapTy& VMap
- bool ModuleLevelChanges
- SmallVectorImpl<llvm::ReturnInst*>& Returns
- const char* NameSuffix = ""
- llvm::ClonedCodeInfo* CodeInfo = nullptr
- llvm::ValueMapTypeRemapper* TypeMapper = nullptr
- llvm::ValueMaterializer* Materializer = nullptr