[PATCH] D94363: [AA] Pass AAResults through AAQueryInfo

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 27 05:19:15 PDT 2022


nikic updated this revision to Diff 463193.
nikic added a reviewer: reames.
nikic added a comment.
Herald added a subscriber: jeroen.dobbelaere.
Herald added a project: All.

Rebase. I made an error in my previous compile-time test, it turns out that this change has no significant impact after all.

The original motivation for this patch mostly went away, but I still think that doing this is a good idea. Our current AA infrastructure is really complicated, with some convoluted layering of 7 different classes (AAResults, BatchAAResults, AAQueryInfo, AAResults::Concept, AAResults::Model, AAResultBase and AAResultsProxy).

This patch removes the AAResultsProxy part of the equation. An immediate followup would be to make AAResultBase non-CRTP (this patch leaves behind an unused template argument). Possible followups on top of that would be:

- Make AAResultBase virtual itself and drop the AAResults::Concept and AAResults::Model indirections. I gave this a try but it turned out to be not entirely straightforward due to some NewPM interaction, but should be principally possible now.
- Make methods that take AAQueryInfo member methods of AAQueryInfo. This should prevent accidentally not passing on AAQI. With this BatchAAResults would reduce down to AAQueryInfo, we could just make it an alias.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94363/new/

https://reviews.llvm.org/D94363

Files:
  llvm/include/llvm/Analysis/AliasAnalysis.h
  llvm/lib/Analysis/AliasAnalysis.cpp
  llvm/lib/Analysis/BasicAliasAnalysis.cpp
  llvm/unittests/Analysis/BasicAliasAnalysisTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94363.463193.patch
Type: text/x-patch
Size: 20229 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220927/c02e1415/attachment.bin>


More information about the llvm-commits mailing list