rjmccall added a comment.

The hot-patch use case actually shouldn't care if the compiler/linker throws 
away unused things because it can't possibly affect how the patch interoperates 
with existing code.  This does rely on the unanalyzable-use part of the 
semantics, though, to stop the compiler from removing uses that could become 
significant after hot-patching.

Force-emitting every `static` in the translation unit can be very expensive; 
there are a lot of headers that declare all their constants as `static const`.  
And removing dead globals is a pretty important optimization, e.g. to eliminate 
the string literals used by assertions that the compiler was able to fold to 
`true`.  So I don't think it's unreasonable for us to ask whether we should 
just be naively adding this option instead of figuring out a more targeted way 
of satisfying these users.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150221

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

Reply via email to