This is an archive of the discontinued LLVM Phabricator instance.

[CFLAA] Add support for AliasAttrs in CFLAndersAliasAnalysis
ClosedPublic

Authored by grievejia on Jul 13 2016, 5:08 PM.

Details

Summary

This patch teaches CFLAnders to understand AliasAttrs properly.

Initially I thought that propagating AliasAttrs should be performed along with propagating ReachSet. However, after several attempts I settled down on the current implementation where AliasAttrs are propagated after ReachSet has reached its fixpoint. This approach seems to be simpler to write.

Diff Detail

Event Timeline

grievejia updated this revision to Diff 63886.Jul 13 2016, 5:08 PM
grievejia retitled this revision from to [CFLAA] Add support for AliasAttrs in CFLAndersAliasAnalysis.
grievejia updated this object.
grievejia added a subscriber: llvm-commits.

Thanks for the patch!

lib/Analysis/CFLAndersAliasAnalysis.cpp
159

Missing period.

167

insert + map brings the implication of "won't be inserted if the key already exists." Could we rename this to 'merge', or 'add', or something like that, please? :)

433

Do we "push the attributes down" at any point?

E.g. given

void doFoo(int ***a) {
  int **b = *a;
  int *c = *b;
}

Will c end up with AttrCaller?

463

Can we either move IValueAttrMap, or just call buildAttrMap in the FunctionInfo ctor call here, please?

grievejia updated this revision to Diff 64148.Jul 15 2016, 9:26 AM
grievejia edited edge metadata.
grievejia marked 4 inline comments as done.

Rebase and fixed the downward propagation issue.

george.burgess.iv edited edge metadata.

Looks good -- will commit later today. Thanks for working on this!

This revision is now accepted and ready to land.Jul 15 2016, 11:25 AM
This revision was automatically updated to reflect the committed changes.