Page MenuHomePhabricator

[BasicAA] Don't pass through AA metadata (NFCI)
AcceptedPublic

Authored by nikic on Oct 24 2020, 8:11 AM.

Details

Summary

BasicAA itself doesn't make use of AA metadata, but passes it through to recursive queries and makes it part of the cache key. Aliasing decisions that are based on AA metadata (i.e. TBAA and ScopedAA) are based *only* on AA metadata, so checking them with different pointer values or sizes is not useful, the result will always be the same.

By itself, this change is a mild compile-time improvement (https://llvm-compile-time-tracker.com/compare.php?from=93127a4d7350261ed9ee2ccaa9c369eda2b60198&to=f4d0c5f01dc446f0c40e8dd81e6b9e9b02217c4d&stat=instructions). However, the actual goal here is to remove the AA metadata from the cache key and thus reduce it's size significantly (from 96 to 32 bytes), which will be the more impactful change. I plan to do that as a followup, but could also include it here.

Diff Detail

Event Timeline

nikic created this revision.Oct 24 2020, 8:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 24 2020, 8:11 AM
nikic requested review of this revision.Oct 24 2020, 8:11 AM
asbirlea accepted this revision.Oct 28 2020, 1:28 PM

This is an interesting point. IIUC, your argument is that the entry point into AA is always through AAResults and can rely on the invocation result for TBAA or ScopedAA from there, while the recursive invocations into these same analyses cannot yield stricter results. I cannot think of a case when this is not true.

This revision is now accepted and ready to land.Oct 28 2020, 1:28 PM