efriedma added a comment.

I'm not really happy with the way this implicitly ties the implementation of 
this function to the implementation of TargetMachine::useEmulatedTLS().  I'd 
prefer to just make clang always explicitly compute whether EmullatedTLS is 
enabled, then always set ExplicitEmulatedTLS, so the backend can't choose 
something different from what the frontend thinks it should be using.  (So we 
always call hasDefaultEmulatedTLS() if we can't find an femulated-tls flag in 
CompilerInvocation.  And the ExplicitEmulatedTLS flag in clang goes away.)

Alternatively, if you think clang really shouldn't care whether emulated TLS is 
enabled, we could just conservatively return false from shouldAssumeDSOLocal, 
and let some later optimization clean it up.  Not sure what implications that 
has for code generation.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132848

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

Reply via email to