Convert the instruction operands from referencing the current values into those specified by VM.

Synopsis

Declared in <llvm/Transforms/Utils/ValueMapper.h>

void
RemapInstruction(
    Instruction* I,
    ValueToValueMapTy& VM,
    RemapFlags Flags = RF_None,
    ValueMapTypeRemapper* TypeMapper = nullptr,
    ValueMaterializer* Materializer = nullptr,
    MetadataPredicate const* IdentityMD = nullptr);

Description

If RF_IgnoreMissingLocals is set and an operand can't be found via MapValue(), use the old value. Otherwise assert that this doesn't happen.

Note that MapValue() only returns nullptr for SSA values missing from VM.

Parameters

Name

Description

I

Instruction whose operands and metadata are remapped.

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.

Created with MrDocs