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

Philip Pfaffe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 27 02:07:35 PST 2019


philip.pfaffe added a comment.

> Do you suggest to get rid of the current scheme where we have a single output file for all kinds of "info data"?

No I don't, that should certainly be the default.

> Perhaps you can expand a bit on what exactly in *this* change do you see as problematic?

This patch adds to global state and it solves having multiple output streams in  a very convoluted way. Since there's only a single callback the //callee// has to figure out who the  caller is to give them the right file. And that's not as simple as looking at the thread id or something like that. For Statistics, it makes no sense to output to different files, because the statistics are singleton.

> Your previous comment was mostly about overall -stats/-time-passes design, which I consider to be somewhat orthogonal here.

My comment was about decentralizing the info output file setting. I'm thinking the current `CreateInfoOutputFile` should be the default for things printing out infos. But in those cases where we want //multiple// info output streams, the override should be controlled by the caller (in this particular instance, TimePassesHandler, e.g.).


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