[LLVMdev] Timing the IRReader
evan.cheng at apple.com
Sun Mar 3 11:29:17 PST 2013
I think this is definitely useful and #2 makes sense to me.
On Mar 1, 2013, at 1:25 PM, Eli Bendersky <eliben at google.com> wrote:
> On Thu, Feb 28, 2013 at 12:59 PM, Eli Bendersky <eliben at google.com> wrote:
>> While doing various profiling runs of llc, it's easy to notice that
>> some wall-clock time is not accounted for by -time-passes (e.g. only 7
>> out of 9.2 seconds for compiling gcc). Some of the "lost" time is in
>> reading the bitcode file (~ 1 sec). When reading textual IR, its
>> parsing actually takes almost as much time as doing the actual -O0
>> I think it would be useful if we could ask the tools to time how long
>> IR reading took (perhaps expanding it later to break down
>> materialization, etc). In addition to significantly minimizing
>> un-accounted time, this can facilitate future attempts to optimize the
>> IR reading code. Any objections/insights?
>> If this is deemed useful, there's the question of implementation.
>> 1. Piggybacking on time-passes (like DWARF dumping does) is probably
>> not the "right thing to do", and hard to implement too since some
>> tools like llvm-diff don't even link in the pass infrastructure (which
>> defines the required globals).
>> 2. Creating a separate flag is feasible, but IRReader is currently
>> header-only. So an implementation file has to be created to hold the
>> actual flag.
>> 3. Any other ideas?
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the llvm-dev