This is an archive of the discontinued LLVM Phabricator instance.

Refactor the PSI to extract getCallSiteCount and remove checks for profile type.
ClosedPublic

Authored by danielcdh on Mar 9 2017, 5:10 PM.

Event Timeline

danielcdh created this revision.Mar 9 2017, 5:10 PM
eraman added inline comments.Mar 10 2017, 10:25 AM
include/llvm/Analysis/ProfileSummaryInfo.h
57

May be rename it to getProfileCount()?

lib/Analysis/ProfileSummaryInfo.cpp
73

Add an assert to check this is CallInst or InvokeInst.

danielcdh updated this revision to Diff 91375.Mar 10 2017, 10:35 AM
danielcdh marked 2 inline comments as done.

update

eraman accepted this revision.Mar 10 2017, 11:43 AM

Please run clang-format to fix the formatting issue before committing this patch.

include/llvm/Analysis/ProfileSummaryInfo.h
59

Not formatted correctly.

This revision is now accepted and ready to land.Mar 10 2017, 11:43 AM
danielcdh updated this revision to Diff 91390.Mar 10 2017, 11:55 AM
danielcdh marked an inline comment as done.

update

danielcdh closed this revision.Mar 10 2017, 11:57 AM