nikic added a comment.

In D125291#3548671 <https://reviews.llvm.org/D125291#3548671>, @jyknight wrote:

> Anyhow -- I think the prototype I'm fiddling with is also along the path to 
> the ideal long-term state, but pushing it beyond a prototype seems like it'll 
> be a pain in the ass due to the bitcode compatibility requirement. (The 
> bitcode upgrader would need to know how to transform all constant expressions 
> using a TLS global into non-constant IR instructions, starting with a call to 
> llvm.threadlocal.address -- in every function where the "constant" is 
> referenced. For uses outside a function body, it transforms to an arbitrary 
> address (e.g. null), instead.)

I have implemented support for converting constant expressions to instructions 
in the bitcode reader in https://reviews.llvm.org/D127729. This was originally 
intended for constant expression removal, but I think with that infrastructure 
in place, upgrading TLS global references to use an intrinsic would be fairly 
simple.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125291/new/

https://reviews.llvm.org/D125291

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to