[PATCH] D53424: Enable thread specific cl::opt values for multi-threaded support
Dan Liew via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 23 07:30:57 PDT 2018
delcypher added a comment.
@yrouban While I agree with what you're trying to achieve, I'm not a huge fan of the implementation.
- LLVM’s global options are great for easily changing things during development but they are terrible from a library user perspective. If the default values of these options are not good for a user it really suggests they need to be moved into a proper API.
- Given that `cl::opt`’s are usually global it feels extremely weird that reading and writing to these could actually be a thread local operation.
On the other hand what you've done seems like it could be reasonable stop-gap to allow you to make progress. However I really don't want to see what's in this patch become permanent unless there is a strong commitment from the community to start cleaning up our global options mess so that this patch can eventually be removed.
Repository:
rL LLVM
https://reviews.llvm.org/D53424
More information about the llvm-commits
mailing list