[PATCH] Adding a timing option for IR parsing

Eli Bendersky eliben at google.com
Fri Mar 22 13:18:05 PDT 2013


>
> On Thu, Mar 21, 2013 at 7:24 PM, Chandler Carruth <chandlerc at google.com>wrote:
>>>
>>>> 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.
>>>>
>>>
>>> Can you explain what kind of build this breaks?
>>>
>>> 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?
>>>
>>>
>>> To answer your middle question. Just reuse -time-passes and expose the
>>> flag in LLVMContext.
>>>
>>> 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?
>>>
>>
>> Chatted with Chris on IRC and he seemed happier with a new library. I'm
>> adding that now.
>>
>> It's called "IRReader" so we have IRReader/IRReader.h... if anyone really
>> wants a different name, shout...
>>
>
> 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".
>
>
> 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.
>
> -Andy
>

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 ?

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.

Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130322/d630dcd8/attachment.html>


More information about the llvm-commits mailing list