[PATCH] D66510: Fix for "DICompileUnit not listed in llvm.dbg.cu" verification error after cloning a function from a different module
Oleg Pliss via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 20 21:59:33 PDT 2019
OlegPliss added a comment.
In D66510#1638669 <https://reviews.llvm.org/D66510#1638669>, @efriedma wrote:
> Why are the changes to CloneModule.cpp necessary?
CloneModule calls CloneFunction for all functions. These calls insert all DICompileUnits reachable from the functions to "llvm.dbg.cu" metadata. Without the changes in CloneModule those DICompileUnits are inserted again. Duplicate named metadata operands make output of some tests dependent on number of passes of the optimizer pipeline, and the tests fail.
> Can you provide a testcase showing that we don't copy unnecessary compile units?
This property is guaranteed by correctness of DIFinder which is not touched by my changes. Only DIFinder.compile_units() are inserted to "llvm.dbg.cu". DIFinder.compile_units() is a set of compile units reachable from original function, and they are shared with the clone.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66510/new/
https://reviews.llvm.org/D66510
More information about the llvm-commits
mailing list