This is an archive of the discontinued LLVM Phabricator instance.

cc1_main: Do not print statistics in -disable_free mode.
ClosedPublic

Authored by MatzeB on Jun 14 2016, 1:13 PM.

Details

Summary

llvm statistics are currently printed when the destructor of a
"static ManagedStatic<StatisticInfo> StatInfo" in llvm runs.
This destructor currently runs in each case as part of llvm_shutdown()
which is run even in disable_free mode as part of main(). I assume that
this hasn't always been the case.

Removing the special code here avoids the statistics getting printed
twice.

Diff Detail

Repository
rL LLVM

Event Timeline

MatzeB updated this revision to Diff 60732.Jun 14 2016, 1:13 PM
MatzeB retitled this revision from to cc1_main: Do not print statistics in -disable_free mode..
MatzeB updated this object.
MatzeB added reviewers: doug.gregor, bkramer.
MatzeB set the repository for this revision to rL LLVM.
MatzeB added a subscriber: cfe-commits.
bruno accepted this revision.Jun 15 2016, 11:44 AM
bruno edited edge metadata.

Assuming that it's guaranteed that the other path would always print out the statistics, LGTM

This revision is now accepted and ready to land.Jun 15 2016, 11:44 AM
This revision was automatically updated to reflect the committed changes.