This is an archive of the discontinued LLVM Phabricator instance.

[CFLAA] Move CFLGraphBuilder out of CFLSteensAliasAnalysis
ClosedPublic

Authored by grievejia on Jul 5 2016, 3:47 PM.

Details

Summary

CFLGraphBuilder can be useful to both CFLSteensAliasAnalysis and CFLAndersAliasAnalysis, just like CFLGraph. Move it out to for future use by CFLAndersAliasAnalysis.

Since CFLGraphBuilder needs to use CFLSteens/CFLAnders for interprocedural analysis, I've made it template on the type of AA that uses it. This does impose an implicit API constraint on the AA: we expect it to a getAliasSummary() member function so that the summary of any functions can be retrieved. I didn't make any attempts to properly enforce this constraint (except mentioning it in the documentation), since doing that may require some SFINAE tricks that'll confuse the main point of the codes. Concept will help on that, but we are still not there :)

Diff Detail

Repository
rL LLVM

Event Timeline

grievejia updated this revision to Diff 62797.Jul 5 2016, 3:47 PM
grievejia retitled this revision from to [CFLAA] Move CFLGraphBuilder out of CFLSteensAliasAnalysis.
grievejia updated this object.
grievejia added a subscriber: llvm-commits.

LGTM; will commit later. Thanks for the patch!

This revision was automatically updated to reflect the committed changes.