This is an archive of the discontinued LLVM Phabricator instance.

Compute summary before calling extractProfTotalWeight
ClosedPublic

Authored by eraman on Jan 13 2017, 3:10 PM.

Details

Summary

extractProfTotalWeight checks if the profile type is sample profile, but before that we have to ensure that summary is available. Also expanded the unittest to test the case where there is no summary.

Diff Detail

Event Timeline

eraman updated this revision to Diff 84395.Jan 13 2017, 3:10 PM
eraman retitled this revision from to Compute summary before calling extractProfTotalWeight.
eraman updated this object.
eraman added reviewers: davidxl, danielcdh.
eraman added a subscriber: llvm-commits.
danielcdh accepted this revision.Jan 13 2017, 3:25 PM
danielcdh edited edge metadata.
This revision is now accepted and ready to land.Jan 13 2017, 3:25 PM
davidxl accepted this revision.Jan 13 2017, 3:28 PM
davidxl edited edge metadata.

lgtm

unittests/Analysis/ProfileSummaryInfoTest.cpp
101

It is slightly more readable to do:

const char *ProfKind = nullptr;
auto M = makeLLVMModule(ProfKind);

This revision was automatically updated to reflect the committed changes.