<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 17, 2014 at 10:35 AM, Chris Bieneman <span dir="ltr"><<a href="mailto:beanz@apple.com" target="_blank">beanz@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><div>On Sep 16, 2014, at 5:28 PM, Chandler Carruth <<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>> wrote:</div><br><blockquote type="cite"><div dir="ltr">Picking this back up, I think that your patch with some cleanups is probably the right starting point. I think the only really substantive issue I currently have is that I'd rather have the OptionRegistry in the LLVMContext rather than in a singleton method. I understand we'll also have to add similar registries to other context objects (MCContext at least), but I think it's useful to start off with just one context initially.</div></blockquote><div><br></div></span><div>In my last patches I had the OptionRegistry really just being a template type that conformed to the get interface. I was having it be a singleton so that we have a way to gradually transition. To make it the context means we'll need to change all the pass constructors and the pass macros up front. My thoughts on how to phase this in are that we first use the template/singleton that I had in my last patches. Then we can update the context to conform to the API, and migrate the macros and pass construction to pass the context in. After that we can remove the default constructors from the passes and replace the template argument with LLVMContext.</div><div><br></div><div>Does that sound like a good roadmap for a transition?</div></blockquote><div><br></div><div>Hmm, OK. I disagree with some specifics (I don't think we want to do this in the constructor) but it should be easy to sort that out as it comes up.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br><blockquote type="cite"><div dir="ltr"><div><br></div><div>How do you want to go about the review / cleanups on the patch? Maybe a new thread? I have a couple of significant things and probably a bunch of really minor cleanup stuff.</div></div></blockquote><div><br></div></span>Sounds good to me. How about I clean up my patches based on your recommendations below and start a Phabricator review?</blockquote></div><br>Sure.</div></div>