<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div class="im">
<blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><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 class="gmail_quote"><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><blockquote type="cite"><div dir="ltr">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>
<div class="gmail_extra"><div class="gmail_quote">


<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>Can you explain what kind of build this breaks?</div><div><br></div><div>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></div></div></blockquote><div><br></div></div>To answer your middle question. Just reuse -time-passes and expose the flag in LLVMContext.</div><div><br></div><div>On the last question, I would like to see an answer to Chandler's question about whether anyone cares if they now automatically link the IR parser. Maybe Chandler should re-ask on llvm-dev?</div>


</div></blockquote><div><br></div></div><div>Chatted with Chris on IRC and he seemed happier with a new library. I'm adding that now.</div><div><br></div><div>It's called "IRReader" so we have IRReader/IRReader.h... if anyone really wants a different name, shout...</div>

</div></div></div></blockquote><div><br></div><div>So should the flag go back to IRReader or to LLVMContext? I still think it makes sense to have it separate because we have a bunch of LLVM tools that read IR but don't run any "passes".</div>
</div></div></div></blockquote><div><br></div></div><div>Back now to Nadav's original question. Why do we need a new command line flag? I don't see a good reason. If someone want to -time-passes, I think they'll be happy to get IR parsing time too. If the tool doesn't run formal passes, then it just shows parsing time and any other times the tool chooses to add under the TimePassesIsEnabled flag.</div>
<div><br></div><div>-Andy</div></div></div></blockquote><div><br></div><div style>So you're proposing to place TimePassesIsEnabled in LLVMContext.cpp, and expose it (as well as the timer group name which will have to be reused in both PassManager and IRReader) in LLVMContext.h ? </div>
<div style><br></div><div style>As a matter of personal opinion, this just seems really ugly to me. If I'm misunderstanding, could you just propose a patch that does this in a way you find natural? It's really not much code involved here... Mainly deciding where to put it.</div>
<div style><br></div><div style>Eli</div><div><br></div><div><br></div><div><br></div></div></div></div>