[PATCH] D58572: [Support] allow -stats/-time-passes reporting into a custom stream

Fedor Sergeev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 25 16:03:06 PST 2019


fedor.sergeev added a comment.

In D58572#1408671 <https://reviews.llvm.org/D58572#1408671>, @philip.pfaffe wrote:

> I don't think this is sufficient or goes into the right direction to support parallel info collection and output.
>
> For the new PassManager, reporting per-thread timings is trivial already and requires no (additional) global state. You can just create a TimePassesHandler instance per thread or per pipeline.


A global state of the data being collected is indeed a problem, yet I'm not trying to address it here.

This change is focused purely on the stream that LLVM uses to report the data being collected.
No matter how many TimePassesHandlers you create they all emit into the same CreateInfoOutputFile() - either stderr or a single file.
I'm trying to solve a problem of a badly interleaved output, thats all.

> For Statistics on the other hand the approach in this change is insufficient, because the statistics registry is already a singleton. In order to support parallel statistics collection, can we get rid of the Statistics singleton?

Yes, unfortunately for now the only case that will work for me is -time-passes with new pass manager (and that  means - just opt, and not codegen :( ).
But that will be a separate fight (which I perhaps will dash into).


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58572/new/

https://reviews.llvm.org/D58572





More information about the llvm-commits mailing list