https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63572

--- Comment #31 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
In theory, what we could do (expensive though) is keep the IL of the functions
that were ICF merged with the picked up candidate, just mark them in cgraph
specially so that e.g. IPA doesn't consider references to functions/vars from
the other copies as distinct references, compile those functions right after
compiling their chosen ICF winner (or right before it), but don't emit into
assembly, instead compare with how the ICF winner
and emit just debug info for the other copies after building some mapping
between the debug related labels in the different functions.  If we compiled it
into different code, something bad happened (e.g. some debug counter or
similar) and we'd just not emit the debug info for the other copies (like we
don't emit it currently for those).

Reply via email to