Page MenuHomePhabricator

[MemoryLocation] learn about ptr_provenance
Needs ReviewPublic

Authored by jeroen.dobbelaere on Aug 3 2021, 7:45 AM.

Details

Summary

Introduce a ptr_provenance member to MemoryLocation.

Note: in the full restrict patches, the ptr_provenance was tracked through the AAMDNodes. For this extraction of the feature, I feel that the MemoryLocation is a more logical place for it. (aka, the provenance is associated to a location, not to the Alias Analysis Metadata).

Diff Detail

Event Timeline

jeroen.dobbelaere requested review of this revision.Aug 3 2021, 7:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 3 2021, 7:45 AM

As shown in https://llvm-compile-time-tracker.com/index.php?config=NewPM-O3&stat=instructions&branch=dobbelaj-snps/perf/ptr_provenance-20210803-03, it seems that tracking the ptr_provenance in the MemoryLocation results in a pretty big extra overhead.

Tracking it in the AAMDNodes as we do in the full restrict patches (See https://llvm-compile-time-tracker.com/index.php?config=NewPM-O3&stat=instructions&branch=dobbelaj-snps/perf/full_restrict-20200918 ; change f3d32e5da7 'looking through noalias intrinsics') seems to have a less severe impact..

  • Rebased
  • use llvm::hash_combine instead of xor for combining the different elements. This avoids hash clashes when ptr == ptr_provenance
Herald added a project: Restricted Project. · View Herald TranscriptApr 15 2022, 7:03 AM