[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
Fri Feb 22 23:45:07 PST 2019


fedor.sergeev created this revision.
fedor.sergeev added reviewers: dsanders, philip.pfaffe, chandlerc.
Herald added subscribers: jdoerfert, kristina, dexonsmith.
Herald added a project: LLVM.

Extending the notion of info-output-file by replacing it with
a generic getInfoOutputStream. By default it is still populated with
the file stream created from a managed-static LibSupportInfoOutputFilename.

New interface introduced:

  llvm::setInfoOutputStreamProvider

which allows to specify a custom callback which provides an output stream
when needed.

Current intended use is to get "info" output into separate output streams per
each compilation, allowing to, say, get independent non-overlapping pass-times
reports for parallel independent compilations. It can be implemented by installing
a custom stream provider that manages thread-local copies of output streams.

That "thread-aware" provider is not supplied with this fix.


Repository:
  rL LLVM

https://reviews.llvm.org/D58572

Files:
  include/llvm/ADT/Statistic.h
  lib/IR/PassTimingInfo.cpp
  lib/Support/Statistic.cpp
  lib/Support/Timer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58572.188030.patch
Type: text/x-patch
Size: 8189 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190223/cbac200f/attachment-0001.bin>


More information about the llvm-commits mailing list