[llvm-dev] [RFC][Cloning] A potential bug when cloning GV declarations
Min-Yih Hsu via llvm-dev
llvm-dev at lists.llvm.org
Mon Aug 26 06:13:22 PDT 2019
Hi,
Currently in llvm::CloneModule, if a global variable (GV) is a declaration,
we won't assign a initializer, copy the metadata, and copy the comdat. (
https://github.com/llvm/llvm-project/blob/master/llvm/lib/Transforms/Utils/CloneModule.cpp#L120
)
However, if we don't copy metadata for GV declarations, some optimizations
might be missing due to the lack of information provided by metadata.
I'm wondering whether there is any comment or objection if we copy metadata
for GV declarations.
Thank you
--
Min-Yih Hsu
Ph.D Student in ICS Department, University of California, Irvine (UCI).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190826/6f31f108/attachment.html>
More information about the llvm-dev
mailing list