Clone and prune OldFunc into NewFunc starting at a given instruction.
Declared in <llvm/Transforms/Utils/Cloning.h>
void
CloneAndPruneIntoFromInst(
Function* NewFunc,
Function const* OldFunc,
Instruction const* StartingInst,
ValueToValueMapTy& VMap,
bool ModuleLevelChanges,
SmallVectorImpl<ReturnInst*>& Returns,
char const* NameSuffix,
ClonedCodeInfo& CodeInfo);
Behaves like CloneAndPruneFunctionInto, but begins cloning at StartingInst rather than at the entry block.
| Name | Description |
|---|---|
| NewFunc | Destination function that receives the pruned clone. |
| OldFunc | Source function to clone from. |
| StartingInst | First instruction of OldFunc to begin cloning at. |
| VMap | Mapping from old values to new ones; updated during cloning. |
| ModuleLevelChanges | Whether module-level value remapping is allowed. |
| Returns | Filled with return instructions from the cloned body. |
| NameSuffix | Suffix appended to cloned value names. |
| CodeInfo | Collector for statistics about the cloned code. |