enum RemapFlags
Description
These are flags that the value mapping APIs allow.
Declared at: llvm/include/llvm/Transforms/Utils/ValueMapper.h:66
Enumerators
Name | Value | Comment |
---|---|---|
RF_None | 0 | |
RF_NoModuleLevelChanges | 1 | If 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_IgnoreMissingLocals | 2 | If 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_MoveDistinctMDs | 4 | Instruct the remapper to move distinct metadata instead of duplicating it when there are module-level changes. |
RF_NullMapMissingGlobalValues | 8 | Any global values not in value map are mapped to null instead of mapping to self. Illegal if RF_IgnoreMissingLocals is also set. |