[PATCH] D22634: [CFLAA] Add support for field offset in CFLAnders::FunctionInfo

Jia Chen via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 21 10:45:18 PDT 2016


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

CFLAnders::FunctionInfo used to record, for each value X, what other values Y may-alias it. Such an approach is inadequate if we were to move to a field-sensitive analysis. This patch changes the map type from Value->[Value] to Value->[(Value, Offset)]. In other words, instead of keeping track of "X alias Y", FunctionInfo now understands a more general alias pattern "X alias (Y + FieldOffset)". The strategy of alias query handling gets adjusted accordingly to code with this change: now CFLAnders can potentially answer "PartialAlias" for certain queries. 

Note that only the interfaces of FunctionInfo gets changed in this patch. The analysis body is still oblivious about field offset, therefore no functional change was introduced.

More patches on field-sensitivity will come in the near future.

https://reviews.llvm.org/D22634

Files:
  lib/Analysis/AliasAnalysisSummary.cpp
  lib/Analysis/AliasAnalysisSummary.h
  lib/Analysis/CFLAndersAliasAnalysis.cpp
  lib/Analysis/CFLGraph.h
  lib/Analysis/CFLSteensAliasAnalysis.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22634.64922.patch
Type: text/x-patch
Size: 12920 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160721/0f97816e/attachment.bin>


More information about the llvm-commits mailing list