Umesh Kalappa via llvm-dev
2020-May-15 04:02 UTC
[llvm-dev] Fwd: [PATCH] D79314: PR45733 : global weak symbol are excluded from the optimization .
Hi Eli and All, Thank you for the suggestions, the subjected review is blocking our internal release. We would like to know community suggestions over the problem and fix , that we suggested. Appreciate your time and thank you ~Umesh ---------- Forwarded message --------- From: Umesh Kalappa via Phabricator <reviews at reviews.llvm.org> Date: Wed, May 13, 2020 at 10:02 AM Subject: [PATCH] D79314: PR45733 : global weak symbol are excluded from the optimization . To: <umesh.kalappa0 at gmail.com>, <renatoriolino at gmail.com>, < spatel at rotateright.com>, <tpr.ll at botech.co.uk>, <efriedma at quicinc.com> Cc: <llvm-commits at lists.llvm.org>, <88888yl at gmail.com>, < Samuel.j.knapp at btinternet.com>, <florian_hahn at apple.com> umesh.kalappa0 added a comment. In D79314#2032099 <https://reviews.llvm.org/D79314#2032099>, @efriedma wrote:> Okay, so assuming that optimization is invalid, there's a bug in clang*somewhere*. You haven't explained why this is the right fix.> > LLVM IR is a distinct language with its own specification. Thedefinition of weak_odr is very explicitly written out. If you're going to change LLVM IR optimizations, you need to justify the change in terms of that specification, not C code. In D79314#2032099 <https://reviews.llvm.org/D79314#2032099>, @efriedma wrote:> Okay, so assuming that optimization is invalid, there's a bug in clang*somewhere*. You haven't explained why this is the right fix. We are bailing out the optimization, if the global has the weak_odr linkage ,which is explicit in the condition check .> LLVM IR is a distinct language with its own specification. Thedefinition of weak_odr is very explicitly written out. If you're going to change LLVM IR optimizations, you need to justify the change in terms of that specification, not C code. Yes, don't propagate the constant for the weak_odr / weak globals (in SCCP ). Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79314/new/ https://reviews.llvm.org/D79314 <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Virus-free. www.avast.com <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200515/4be7fcfd/attachment.html>