[llvm-dev] [RFC] Enable thread specific cl::opt values for multi-threaded support (original) (raw)

Yevgeny Rouban via llvm-dev llvm-dev at lists.llvm.org
Mon Oct 22 07:46:46 PDT 2018


Hello Matthias.

The idea of having a separate API for options in LLVMContext is good but difficult to implement. That is probably why it has not been evolved. There are so many cl::opt all over the code to change ... This would also split all cl::opt into incompatible groups: those that are bound to LLVMContext and those that are not. With the proposed thread local option context (https://reviews.llvm.org/D53424) your idea can be simulated by binding LLVMContexts with ContextValues and setting threads to their LLVMContexts' ContextValues. I believe that D53424 is a minimal change that can greatly extend the cl::opt-based configuration flexibility without affecting other aspects. This change does not contradict with module flags, LLVMContext Debug options and other ways we have to customize the pipeline.

Thanks. -Yevgeny Rouban -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181022/977f370a/attachment.html>



More information about the llvm-dev mailing list