This is an archive of the discontinued LLVM Phabricator instance.

[PassTiming] reporting time-passes separately for multiple pass instances of the same pass
ClosedPublic

Authored by fedor.sergeev on Aug 31 2018, 4:30 AM.

Details

Summary

Refactoring done by rL340872 accidentally appeared to be non-NFC, changing the way how
multiple instances of the same pass are handled - aggregation of results by PassName
forced data for multiple instances to be merged together and reported as one line.

Getting back to creating/reporting timers per pass instance.
Reporting was a bit enhanced by counting pass instances and adding #<num> suffix
to the pass description.

time-passes test updated to account for multiple passes being run.

Diff Detail

Repository
rL LLVM

Event Timeline

fedor.sergeev created this revision.Aug 31 2018, 4:30 AM

Could you please add a test producing something with #2 and #3... I guess any loop pass for function with 2-3 loops should work.

lib/IR/PassTimingInfo.cpp
108 ↗(On Diff #163504)

Move to if() scope below. It is not used in this scope.

Could you please add a test producing something with #2 and #3... I guess any loop pass for function with 2-3 loops should work.

Nope, 2-3 loops wont add #2/#3.
Numbering is for instances of the pass in the pass pipeline.
Current test will generate #2 for the second instcombine, so I will add it to the pattern.
Will also add a couple loops to make it more evident that multiple "IR units" do not affect the count.

as per comments - moving the code around, updating the test.

fedor.sergeev marked an inline comment as done.Sep 3 2018, 3:32 AM
skatkov accepted this revision.Sep 3 2018, 5:06 PM
This revision is now accepted and ready to land.Sep 3 2018, 5:06 PM
This revision was automatically updated to reflect the committed changes.