-time-passes output from llc

Hi -

In looking at the output from -time-passes I notice that there is one set of data for “Instruction Selection and Scheduling”, and then another “Pass execution timing report”.

In looking through the code, it appears that the instruction selection & scheduling time is already accounted for as part of the target machine instruction selection pass that is reported in the pass execution report.

Can someone confirm that this is the case?

Is the goal in reporting the instruction selection & scheduling time separately to keep track of the non-pass, non-target-machine-specific timings separately to have something that is strictly a measure of the target independent code generation phases?

Also - I’ve noticed these reports seem very flaky on Windows. e.g. I often see 0 time reported for all of the instruction selection/scheduling, and of the time reported for the passes, it often displays times that are obviously a multiple of each other, e.g. one phase takes .045s, another .030s, and another 0.015s. Has anybody else noticed anything like this? I also see -track-memory reporting negative memory usage.