<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Thu, Mar 21, 2013 at 7:24 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">FYI, I reverted the patch in r177695 to fix our builds. We check that layering violations don't get any worse in our build system.</div>
</blockquote><div><br></div><div style>Can you explain what kind of build this breaks?</div><div style><br></div><div style>I understand the layering problem, but how do we still get to measure the time IR parsing took? Do you have plans to fix the IR Reader violation any time soon?</div>
<div style><br></div><div style>A temporary workaround would be to just add the measurement flag to llc.cpp - would anyone see a problem with that?</div><div style><br></div><div style>Eli</div><div style><br></div><div style>
<br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div><div>Fundamentally, the existing layering problem is "worked around" but there being no implementation. As long as thats true, all the Support library is providing is a text header file. As long as it is only included into source files that are part of a library which will eventually get linked with the core library, the AsmParser library, and the BitcodeReader library, all is well. Including it into a source file in Support makes the layering violation actively worse.</div>

<div><br></div><div>I think the correct solution is to do one of two things:</div><div><br></div><div>1) Create a new library which depends on both AsmParser and BitcodeReader and which can be used by opt and friends. Put IRReader here.</div>

<div>2) Fold AsmParser into the IR library (where AsmWriter already lives). Put IRReader into the BitcodeReader library.</div><div><br></div><div>I thought about a third option: put both AsmParser and IRReader into the BitcodeReader library. But increasingly that seems like a really gross layering.</div>
<span class="HOEnZb"><font color="#888888">
<div><br></div><div>-Chandler</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 20, 2013 at 9:59 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div><br><div class="gmail_quote">On Wed, Mar 20, 2013 at 8:23 PM, Andrew Trick <span dir="ltr"><<a href="mailto:atrick@apple.com" target="_blank">atrick@apple.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I don't pretend to understand the layering rules. But how can someone use IRReader without linking LLVMCore? I'm not even sure why IRReader is in Support given that it needs a context.</blockquote>


</div><br></div>IRReader is the layering violation. We should fix that, and then this becomes a non-problem.</div><div class="gmail_extra"><br></div><div class="gmail_extra">And yea, I think putting the flag in the context makes a lot of sense.</div>


</div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>