[PATCH] LLVM CFL Alias Analysis -- Algorithm
Daniel Berlin
dberlin at dberlin.org
Mon Jul 21 12:33:58 PDT 2014
Some preliminary comments on this one as well
================
Comment at: lib/Analysis/CFLAliasAnalysis.cpp:121
@@ +120,3 @@
+
+ return MayAlias;
+ if (isa<Constant>(locA.Ptr) && isa<Constant>(locB.Ptr)) {
----------------
Unless i'm miscounting braces, doesn't this cause this function to always return MayAlias?
I assume this was just debugging code that was left in when you were running final numbers, since i've seen the actual numbers :)
================
Comment at: lib/Analysis/CFLAliasAnalysis.cpp:142
@@ +141,3 @@
+// \brief Edges can be one of four "weights"
+enum class EdgeWeight { AssignFrom, AssignTo, Dereference, Reference };
+
----------------
AssignTo appears unused, and could you add a comment about what type of statement you expect each to represent.
================
Comment at: lib/Analysis/CFLAliasAnalysis.cpp:293
@@ +292,3 @@
+ auto *val = inst.getOperand(1);
+ output->push_back({val, ptr, EdgeWeight::Reference});
+ return true;
----------------
Can you talk a bit about why the Insert* calls are Reference edges, instead of say, assignto?
http://reviews.llvm.org/D4551
More information about the llvm-commits
mailing list