Page MenuHomePhabricator

[ProfileSummary] Standardize methods and fix comment.
ClosedPublic

Authored by rcorcs on Nov 17 2018, 12:52 PM.

Details

Summary

Every Analysis pass has a get method that returns a reference of the Result of the Analysis,
for example, BlockFrequencyInfo &BlockFrequencyInfoWrapperPass::getBFI().
I believe that ProfileSummaryInfo::getPSI() is the only exception to that, as it was returning a pointer.

Another change is renaming isHotBB and isColdBB to isHotBlock and isColdBlock, respectively.
Most methods use BB as the argument of variable names while methods usually refer to Basic Blocks as Blocks, instead of BB.
For example, Function::getEntryBlock, Loop:getExitBlock, etc.

I also fixed one of the comments.

Diff Detail

Repository
rL LLVM

Event Timeline

rcorcs created this revision.Nov 17 2018, 12:52 PM
vsk accepted this revision.Nov 18 2018, 8:42 AM
vsk added a subscriber: vsk.

I agree that this looks a bit more consistent with the rest of the codebase. LGTM, thanks.

This revision is now accepted and ready to land.Nov 18 2018, 8:42 AM

Can someone please commit this patch for me because I believe I don't have commit access.
Thanks!

This revision was automatically updated to reflect the committed changes.