This is an archive of the discontinued LLVM Phabricator instance.

[MemDep] Use BatchAA when computing pointer dependencies
ClosedPublic

Authored by nikic on Aug 8 2020, 9:37 AM.

Details

Summary

We're not changing IR while running a single MemDep query, so it's safe to cache alias analysis results using BatchAA. This adds BatchAA usage to getSimplePointerDependencyFrom(), which is non-intrusive -- covering larger parts (like a whole processNonLocalLoad query) it also possible, but requires threading BatchAA through a bunch of APIs.

For the ThinLTO configuration, this is a 1% geomean improvement on CTMark: https://llvm-compile-time-tracker.com/compare.php?from=f22ac1d15b1b3c8e890cad4aa126a8239bec61f7&to=3b8dfc926fb695c44c31fddf675a86ee55cba941&stat=instructions

Diff Detail

Event Timeline

nikic created this revision.Aug 8 2020, 9:37 AM
nikic requested review of this revision.Aug 8 2020, 9:37 AM
bmahjour removed a subscriber: bmahjour.Aug 10 2020, 7:41 AM
lebedev.ri resigned from this revision.Aug 12 2020, 2:59 PM

I applaud the change, but i'm probably not the right reviewer for this.

asbirlea accepted this revision.Aug 12 2020, 4:24 PM

Neat improvement. Happy to see BatchAA benefiting this usecase.

llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
365

Add comment on why using BatchAA and caching AA results is valid (no IR changes).

This revision is now accepted and ready to land.Aug 12 2020, 4:24 PM

Reverse ping

This revision was automatically updated to reflect the committed changes.
nikic marked an inline comment as done.