[PATCH] D62067: [Support] Time profiler: support new PassManager

Anton Afanasyev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 21 15:48:36 PDT 2019


anton-afanasyev added a comment.

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

> I might have fallen a bit out of the loop, but can you tell me a bit more details about the use case here? There is no in-tree support for new-PM backend passes currently, is this for an out-of-tree user?
>  What about all the other IRUnit nestings beyond function passes in module pipelines?
>
> Those questions aside, I'm not happy with the implementation. It uses global state, which is bad on its own, but in a way that isn't remotely threadsafe. It also cannot be easily made threadsafe without bigger redesign. Therefore, this isn't going to work in the new PM.
>
> In the new PassManager we have a quite nice instrumentation infrastructure, which is perfectly suited to hook tracers such as this one into the pipeline execution. I suggest implementing -ftime-trace on top of that infrastructure. That being said, it appears as if there's quite some overlap between this tracer and the pass timing things. Why is the existing mechanism insufficient? Is the difference really just the output format? In which case, why not make that customizable instead of rolling out a second timing instrumentation?


Hmm, thank you for noting this all, I'm not familiar with new PM. Could you please describe instrumentation infrastructure you are suggesting?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62067





More information about the llvm-commits mailing list