This is an archive of the discontinued LLVM Phabricator instance.

ftime-trace: Trace the name of the currently active pass as well.
ClosedPublic

Authored by thakis on Apr 16 2019, 9:48 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

thakis created this revision.Apr 16 2019, 9:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 16 2019, 9:48 AM
anton-afanasyev accepted this revision.Apr 16 2019, 10:04 AM

That's exactly the patch I have in my todo :) LGTM.

This revision is now accepted and ready to land.Apr 16 2019, 10:04 AM

Just quickly measured the number of entries increased by this patch (for test-suite/SingleSource/Benchmarks/Misc-C++-EH/spirit.cpp):

$ ~/llvm/llvm-project/build_rel_exp/bin/clang++ -O3 -w -S -ftime-trace spirit.cpp
...
$ wc -l spirit*json
  2540 spirit.be.json
  3438 spirit.be.O3.json
  2429 spirit.nobe.json
  3028 spirit.nobe.O3.json

Here be/nobe -- with/without this patch (backend/no backend), O3 -- with -O3 option. So most of the entries are still on the FE side.

Probably needs a similar change for new-pm?

Probably needs a similar change for new-pm?

new-pm currently doesn't appear in -ftrace-report output at all.

This revision was automatically updated to reflect the committed changes.