<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">That sounds like a good plan, and I think I might be able to sneak in BuryPointer as well, which is just a single function with static variables.<div class=""><br class=""></div><div class="">-- adrian</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 25, 2015, at 1:34 PM, Reid Kleckner <<a href="mailto:rnk@google.com" class="">rnk@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">What do you think about moving CodeGenOptions.cpp to Basic, alongside LanguageOptions and SanitizerSet? CodeGenOptions is basically a big bag of strings and numbers with no dependencies on anything interesting.</div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Feb 25, 2015 at 1:02 PM, Adrian Prantl <span dir="ltr" class=""><<a href="mailto:aprantl@apple.com" target="_blank" class="">aprantl@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><span class="">On Feb 24, 2015, at 6:28 PM, Adrian Prantl <<a href="mailto:aprantl@apple.com" target="_blank" class="">aprantl@apple.com</a>> wrote:<br class=""><blockquote type="cite" class="">You are correct. I need to remove the use of PCHGenerator from ModuleContainerGenerator.<br class=""></blockquote></span><blockquote type="cite" class=""><blockquote type="cite" class="">On Feb 24, 2015, at 6:11 PM, NAKAMURA Takumi <<a href="mailto:geek4civic@gmail.com" target="_blank" class="">geek4civic@gmail.com</a>> wrote:<span class=""><br class="">It still has circular dependencies between clangCodeGen and clangFrontend.<br class=""></span></blockquote></blockquote><div class=""><br class=""></div><div class="">After some deliberation, I noticed that there is actually more to be done here in order to resolve the cyclic dependencies. Here is a graph of (a simplified subset of) the dependencies after this commit:</div><div class=""><div class="">- Pretty much all of CodeGen depends on CodeGenOptions, which is currently part of Frontend.<br class="">- BackendUtil and CodeGenAction depend on both CodeGen and Frontend.<br class="">- CodeGenModuleContainer introduces a cyclic dependency between Frontend and CodeGen.<br class=""><br class=""></div><div class=""><span id="cid:D194D893-1FF0-4701-BC81-3FBA493F4344@apple.com"><before.png></span></div><div class=""><br class=""></div><div class=""><div class="">The above cycle can be resolved by reversing the CodeGen->Frontend dependency and splitting out the common dependencies CodeGenOptions and frontend::utils::BuryPointer into a separate library that I’m calling FrontendSupport for lack of a better name. After this, the only remaining CodeGen->Frontend dependencies are CodeGen/BackendUtil.cpp and CodeGen/CodeGenAction.cpp:</div><div class="">- CodeGenAction looks like it could safely be moved into FrontendTool, which is its only user.</div><div class="">- BackendUtil can stay were it is, it is needed by CodeGenAction and (via CodeGenModuleContainer) by Frontend. The dependency on Frontend can be eliminated by splitting BuryPointer out from Utils.</div><div class="">The new picture then looks like this:</div><div class="">  </div><div class=""><span id="cid:E575061C-D0B9-4E10-AAE1-20613B941FC6@apple.com"><after.png></span></div><div class=""><br class=""></div><div class="">I’ll try and implement it this way; hopefully I didn’t miss any other edges in the graph.</div><span class="HOEnZb"><font color="#888888" class=""><div class="">-- adrian</div></font></span><span class=""><div class=""><br class=""><blockquote type="cite" class=""><br class="">thanks for noticing!<br class="">-- adrian<br class=""></blockquote><br class=""></div></span></div></div></div><br class="">_______________________________________________<br class="">
cfe-commits mailing list<br class="">
<a href="mailto:cfe-commits@cs.uiuc.edu" class="">cfe-commits@cs.uiuc.edu</a><br class="">
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank" class="">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br class="">
<br class=""></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>