This is an archive of the discontinued LLVM Phabricator instance.

[PM] Add full support for alias analyses to the new pass manager, and port aa-eval to the new pass manager to test this support.
AbandonedPublic

Authored by chandlerc on Aug 26 2015, 1:56 AM.

Details

Reviewers
hfinkel
Summary

This rigs up command line parsing of custom AA chains, the per-analysis
commandline parsing, and other infrastructure for the new pass manager.
It also port the AliasAnalysisEvaluator over to the new pass manager,
rigs it up, and uses the combination to run several alias analysis tests
in both legacy and new pass managers.

It also fixes some of the infrastructure in the AA layer for the new
pass manager now that we can effectively test the entire setup, and
I was able to uncover the underlying problems.

With this, the new pass manager support for AA should be sufficient to
port passes requiring AA, and should be functionally complete outside of
testing some of the finer points such as pre-requiring a non-function
analysis.

Depends on D12080.

Diff Detail

Event Timeline

chandlerc updated this revision to Diff 33188.Aug 26 2015, 1:56 AM
chandlerc retitled this revision from to [PM] Add full support for alias analyses to the new pass manager, and port aa-eval to the new pass manager to test this support..
chandlerc updated this object.
chandlerc added a subscriber: llvm-commits.
hfinkel added inline comments.
lib/Passes/PassBuilder.cpp
229

I don't understand why this helps. Where is the variable referenced?

chandlerc added inline comments.Aug 27 2015, 11:44 AM
lib/Passes/PassBuilder.cpp
229

The CREATE_PASS bit for the AAManager expands to "std::move(AAM)" below, because that's what registerFunctionAnalyses wants so that you can customize the AA manager that ends up in your analysis manager.

hfinkel added inline comments.Aug 27 2015, 12:17 PM
lib/Passes/PassBuilder.cpp
229

Ah, okay. Please update the comment to explain that (that it is referenced by the CREATE_PASS macro).

chandlerc updated this revision to Diff 34483.Sep 10 2015, 1:40 PM

Rebased now that AA stuff is landed and addressed Hal's comment.

hfinkel accepted this revision.Sep 18 2015, 5:45 PM
hfinkel added a reviewer: hfinkel.

LGTM.

lib/Analysis/AliasAnalysisEvaluator.cpp
306

I suppose this is to prevent printing stats when there were no input functions? Why do you bother; did we do this indirectly before?

This revision is now accepted and ready to land.Sep 18 2015, 5:45 PM
chandlerc abandoned this revision.Apr 6 2016, 10:23 PM