enum RemapFlags

Description

These are flags that the value mapping APIs allow.

Declared at: llvm/include/llvm/Transforms/Utils/ValueMapper.h:65

Enumerators

NameValueComment
RF_None0
RF_NoModuleLevelChanges1If this flag is set, the remapper knows that only local values within a function (such as an instruction or argument) are mapped, not global values like functions and global metadata.
RF_IgnoreMissingLocals2If this flag is set, the remapper ignores missing function-local entries (Argument, Instruction, BasicBlock) that are not in the value map. If it is unset, it aborts if an operand is asked to be remapped which doesn't exist in the mapping.There are no such assertions in MapValue(), whose results are almost unchanged by this flag. This flag mainly changes the assertion behaviour in RemapInstruction().Since an Instruction's metadata operands (even that point to SSA values) aren't guaranteed to be dominated by their definitions, MapMetadata will return "!{}" instead of "null" for \a LocalAsMetadata instances whose SSA values are unmapped when this flag is set. Otherwise, \a MapValue() completely ignores this flag.\a MapMetadata() always ignores this flag.
RF_ReuseAndMutateDistinctMDs4Instruct the remapper to reuse and mutate distinct metadata (remapping them in place) instead of cloning remapped copies. This flag has no effect when when RF_NoModuleLevelChanges, since that implies an identity mapping.
RF_NullMapMissingGlobalValues8Any global values not in value map are mapped to null instead of mapping to self. Illegal if RF_IgnoreMissingLocals is also set.