Fwd: [PATCH] D79314: PR45733 : global weak symbol are excluded from the optimization .

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Fwd: [PATCH] D79314: PR45733 : global weak symbol are excluded from the optimization .

Fangrui Song via cfe-dev
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 <[hidden email]>
Date: Wed, May 13, 2020 at 10:02 AM
Subject: [PATCH] D79314: PR45733 : global weak symbol are excluded from the optimization .
To: <[hidden email]>, <[hidden email]>, <[hidden email]>, <[hidden email]>, <[hidden email]>
Cc: <[hidden email]>, <[hidden email]>, <[hidden email]>, <[hidden email]>


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.  The definition 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.  The definition 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




Virus-free. www.avast.com

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev