[PATCH] D33655: [Cloning] Take another pass at properly cloning debug info
Keno Fischer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 29 12:23:01 PDT 2017
loladiro created this revision.
In https://reviews.llvm.org/rL302576, DISubprograms gained the constraint that a !dbg attachments to functions must
have a 1:1 mapping to DISubprograms. As part of that change, the function cloning support
was adjusted to attempt to enforce this invariant during cloning. However, there
were several problems with the implementation. Part of these were fixed in https://reviews.llvm.org/rL304079.
However, there was a more fundamental problem with these changes, namely that it
bypasses the matadata value map, causing the cloned metadata to be a mix of metadata
pointing to the new suprogram (where manual code was added to fix those up) and the
old suprogram (where this was not the case). This mismatch could cause a number of
different assertion failures in the DWARF emitter. Some of these are given at
https://github.com/JuliaLang/julia/issues/22069, but some others have been observed
as well. Attempt to rectify this by partially reverting the manual DI metadata fixup,
and instead using the standard value map approach. To retain the desired semantics
of not duplicating the compilation unit and inlined subprograms, explicitly freeze
these in the value map.
https://reviews.llvm.org/D33655
Files:
include/llvm/IR/DebugLoc.h
include/llvm/Transforms/Utils/Cloning.h
lib/IR/DebugLoc.cpp
lib/Transforms/Coroutines/CoroSplit.cpp
lib/Transforms/Utils/CloneFunction.cpp
unittests/Transforms/Utils/Cloning.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33655.100632.patch
Type: text/x-patch
Size: 11510 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170529/750c61cb/attachment.bin>
More information about the llvm-commits
mailing list