This is an archive of the discontinued LLVM Phabricator instance.

[MemProf] Use profiled lifetime access density directly
ClosedPublic

Authored by tejohnson on May 2 2023, 1:07 PM.

Details

Summary

Now that the runtime tracks the lifetime access density directly, we can
use that directly in the threshold checks instead of less accurately
computing from other statistics.

Diff Detail

Event Timeline

tejohnson created this revision.May 2 2023, 1:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 2 2023, 1:07 PM
tejohnson requested review of this revision.May 2 2023, 1:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 2 2023, 1:07 PM
snehasish accepted this revision.May 2 2023, 1:38 PM

lgtm

llvm/lib/Analysis/MemoryProfileInfo.cpp
22

AccessesPerBytePerSec seems to be synonymous to LifetimeAccessDensity which we use elsewhere in this patch. Can we use the same (latter) phrase for this option too? E.g MemprofLifetimeAccessDensityColdThreshold

Also update the options and description if you choose to adopt this suggestion.

llvm/unittests/Analysis/MemoryProfileInfoTest.cpp
74

nit: const

This revision is now accepted and ready to land.May 2 2023, 1:38 PM
tejohnson marked 2 inline comments as done.May 2 2023, 2:01 PM

Also noticed the comments in the new tests for MemProfContextDisambiguation refer to the old version of the lifetime threshold option, updating those too.

tejohnson updated this revision to Diff 518858.May 2 2023, 2:01 PM

Address comments

This revision was landed with ongoing or failed builds.May 2 2023, 3:19 PM
This revision was automatically updated to reflect the committed changes.