This is an archive of the discontinued LLVM Phabricator instance.

[LoopAccessAnalysis] Add a const qualifier to getMaxSafeDepDistBytes()
ClosedPublic

Authored by vedant-amd on Jul 26 2023, 2:59 AM.

Details

Summary

Add a const qualifier to this API call, since this is a member of
MemoryDepChecker and LoopAccessInfo returns an object of this class as a
const, as follows:

const MemoryDepChecker &getDepChecker() const { return *DepChecker; }

If one tries to use function as follows:

LAI->getDepChecker().getMaxSafeDepDistBytes()

results in the following error:

passing ‘const llvm::MemoryDepChecker’ as ‘this’ argument discards
qualifiers

Diff Detail

Event Timeline

vedant-amd created this revision.Jul 26 2023, 2:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 26 2023, 2:59 AM
vedant-amd requested review of this revision.Jul 26 2023, 2:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 26 2023, 2:59 AM
vedant-amd edited the summary of this revision. (Show Details)Jul 26 2023, 3:02 AM
vedant-amd added reviewers: fhahn, sdesmalen, dmgreen.

ping @fhahn , @sdesmalen can you please review this once ? Thanks !

nikic accepted this revision.Jul 31 2023, 2:00 AM
nikic added a subscriber: nikic.

LGTM, please add NFC to the patch title.

This revision is now accepted and ready to land.Jul 31 2023, 2:00 AM

LGTM, please add NFC to the patch title.

Sorry, I forgot to add NFC. Is it possible to rebase and submit again ? or it's fine as it is ?