[PATCH] D22429: [CFLAA] Teach CFLAndersAliasAnalysis to discern reads from writes

Jia Chen via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 15 16:34:39 PDT 2016


grievejia created this revision.
grievejia added reviewers: george.burgess.iv, hfinkel.
grievejia added a subscriber: llvm-commits.

This patch introduces no functional changes.

The original 4-state state machine we used previously does not provide us with enough information to tell value reads from value writes. When given a reachable value alias pair (X, Y), we want to be able to tell if the function (transitively) assigns X to Y, or if the function (transitively) assigns Y to X, or if the function (transitively) assigns a third value Z to both, or if X and Y alias each other only because someone above X and someone above Y alias each other. The "directions" of assignments are very important to us since we need them to generate precise function summaries and yield better mod/ref results. 

To keep track of assignment directions, I tried to add more states to the state machine. The semantics of the new machine should be exactly the same as before, except that given a particular state there's no ambiguities any more regarding what is read and what is written. Please refer to the codes for more details on the meaning of those newly added states.

I also tried to simplify the state machine matching codes with some macro abuses. We might want to get rid of those macros someday, but for now I think they do make things cleaner. 

https://reviews.llvm.org/D22429

Files:
  lib/Analysis/CFLAndersAliasAnalysis.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22429.64210.patch
Type: text/x-patch
Size: 9667 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160715/15075d5e/attachment.bin>


More information about the llvm-commits mailing list