Merges A and B by splitting B at each of A's keys.
Declared in <llvm/ADT/ImmutableSet.h>
template<typename CombineFn>
TreeTy*
merge_internal(
TreeTy* A,
TreeTy* B,
CombineFn& Combine,
bool KeepUnmatched,
bool SkipShared);
For a key in both, the stored element is Combine(AElem, BElem). KeepUnmatched controls keys unique to one side: when true, such elements (and whole non-overlapping subtrees) are taken unchanged and shared, and Combine is invoked only on keys present in both (valid when Combine is an identity for a missing side, e.g. a set union or a lattice join with an identity element); when false every key is passed through Combine with the absent side null (needed for a join that transforms unmatched keys, e.g. liveness downgrading Must to Maybe).
Root of the merged tree (before recoverNodes).
| Name | Description |
|---|---|
| A | First operand tree. |
| B | Second operand tree. |
| Combine | Combiner for elements that share a key (and unmatched keys when KeepUnmatched is false). |
| KeepUnmatched | If true, share unmatched elements/subtrees as-is. |
| SkipShared | If true, return pointer-identical subtrees unchanged. |