Hi Richard,
Ping on v4:
https://inbox.sourceware.org/gcc-patches/[email protected]/
On your question about how the inconsistent state can arise when unification
only happens during WPA, I added a stream-in trace below the --- in v4.
In the traced case, the parameter and local variable origin nodes remain
TU-specific, while their DECL_CONTEXT already points to the same prevailing
function. LTO_SET_PREVAIL replaces references to public or external function
and variable declarations, but not these local origin nodes.
The tree relationships are therefore consistent in this case; the missing
piece is the function DIE's input-TU identity. After the function trees are
unified, external_die_map can retain only one sym/off pair for the prevailing
tree, while the unmerged local origins retain their TU-specific references.
v4 therefore preserves the input-TU DIE reference on the abstract-origin edge
before unification loses it, leaving DECL_ABSTRACT_ORIGIN and
BLOCK_ABSTRACT_ORIGIN as ordinary trees. This follows the direction of the
fixup comment you quoted ("should get fixed with moving to DIE references"),
but only for abstract-origin edges. It covers the out-of-line split clone
and both single and nested inlined instances.
Does this direction look acceptable?
Thanks,
Longjun