<div dir="ltr">Hi,<div><br></div><div>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. (<a href="https://github.com/llvm/llvm-project/blob/master/llvm/lib/Transforms/Utils/CloneModule.cpp#L120">https://github.com/llvm/llvm-project/blob/master/llvm/lib/Transforms/Utils/CloneModule.cpp#L120</a>)</div><div><br></div><div>However, if we don't copy metadata for GV declarations, some optimizations might be missing due to the lack of information provided by metadata.</div><div><br></div><div>I'm wondering whether there is any comment or objection if we copy metadata for GV declarations.</div><div><br></div><div>Thank you</div><div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Min-Yih Hsu</div><div>Ph.D Student in ICS Department, University of California, Irvine (UCI).<br></div></div></div></div></div>