[PATCH] D22325: [CFLAA] Add support for AliasAttrs in CFLAndersAliasAnalysis
George Burgess IV via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 14 15:13:55 PDT 2016
george.burgess.iv added a comment.
Thanks for the patch!
================
Comment at: lib/Analysis/CFLAndersAliasAnalysis.cpp:159
@@ -158,1 +158,3 @@
+// We use AliasAttrMap to keep track of the AliasAttr of each node
+class AliasAttrMap {
----------------
Missing period.
================
Comment at: lib/Analysis/CFLAndersAliasAnalysis.cpp:167
@@ +166,3 @@
+
+ bool insert(InstantiatedValue V, AliasAttrs Attr) {
+ if (Attr.none())
----------------
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? :)
================
Comment at: lib/Analysis/CFLAndersAliasAnalysis.cpp:433
@@ +432,3 @@
+ }
+
+ return AttrMap;
----------------
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?
================
Comment at: lib/Analysis/CFLAndersAliasAnalysis.cpp:463
@@ -364,1 +462,3 @@
+
+ return FunctionInfo(ReachSet, IValueAttrMap);
}
----------------
Can we either `move` `IValueAttrMap`, or just call `buildAttrMap` in the `FunctionInfo` ctor call here, please?
https://reviews.llvm.org/D22325
More information about the llvm-commits
mailing list