Remap the operands, metadata, arguments, and instructions of a function.
Declared in <llvm/Transforms/Utils/ValueMapper.h>
void
RemapFunction(
Function& F,
ValueToValueMapTy& VM,
RemapFlags Flags = RF_None,
ValueMapTypeRemapper* TypeMapper = nullptr,
ValueMaterializer* Materializer = nullptr,
MetadataPredicate const* IdentityMD = nullptr);
Calls MapValue() on prefix data, prologue data, and personality function; calls MapMetadata() on each attached MDNode; remaps the argument types using the provided TypeMapper; and calls RemapInstruction() on every instruction.
| Name | Description |
|---|---|
| F | Function to remap in place. |
| VM | Mapping from original values to remapped values. |
| Flags | Remapping flags that control mapper behavior. |
| TypeMapper | Optional callback that remaps types while mapping values. |
| Materializer | Optional callback that materializes unmapped values. |
| IdentityMD | Optional predicate for metadata that maps onto itself. |