Combine metadata so one instruction can replace another after CSE.
Declared in <llvm/Transforms/Utils/Local.h>
void
combineMetadataForCSE(
Instruction* K,
Instruction const* J,
bool DoesKMove);
Combine the metadata of two instructions so that K can replace J. This specifically handles the case of CSE-like transformations. Some metadata can only be kept if K dominates J. For this to be correct, K cannot be hoisted.
Unknown metadata is removed.
| Name | Description |
|---|---|
| K | Surviving instruction that may replace J. |
| J | Instruction being replaced by K. |
| DoesKMove | Whether K may move relative to J. |