[LLVMdev] [RFC] Removing static initializers for command line options
Chris Bieneman
beanz at apple.com
Thu Aug 21 10:53:32 PDT 2014
The problem that led me to tackling both together was that there are certain command line options that we use today where the storage itself will incur static initializers if it is global. Examples of these are command line options where the stores are lists, strings, and classes.
The fact that our options support these types makes the problem of eliminating static initializers bound to the problem of eliminating global storage. This problem also gets more complicated when you take into account that the logical place to move the storage for many of these options (the passes themselves) don’t actually exist at the time that you are parsing the options.
If you have suggestions on how to tackle these problems I’d be grateful for the feedback.
-Chris
> On Aug 21, 2014, at 10:33 AM, Chandler Carruth <chandlerc at google.com> wrote:
>
>
> On Thu, Aug 21, 2014 at 10:16 AM, Chris Bieneman <beanz at apple.com <mailto:beanz at apple.com>> wrote:
> I’d really prefer if we didn’t gate removing static initializers and global option storage, which I think we can both agree are good things, on a larger change to a core design pattern within LLVM.
>
> FWIW, while I think it may be possible to remove static initializers without changing core design patterns within LLVM, I don't think that's the case for removing global storage. Quite fundamentally, once you're not using global storage I think you want a *different* interface to these things. =/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140821/b3a9d814/attachment.html>
More information about the llvm-dev
mailing list