[PATCH] D26382: [BasicAA] Teach BasicAA to handle the inaccessiblememonly and inaccessiblemem_or_argmemonly attributes

Andy Kaylor via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 7 18:12:12 PST 2016


andrew.w.kaylor created this revision.
andrew.w.kaylor added reviewers: hfinkel, MatzeB, vaivaswatha.
andrew.w.kaylor added a subscriber: llvm-commits.
andrew.w.kaylor set the repository for this revision to rL LLVM.

This patch adds support for the inaccessiblememonly and inaccessiblemem_or_argmemonly attributes to the BasicAA.

I am assuming that any function which is not marked as not referencing memory may be accessing "inaccessible" memory.  There doesn't seem to be a way for a function to indicate otherwise, so we must make this conservative assumption.

I am also assuming that functions marked as "readonly" may read but will not write to inaccessible memory (and similarly with "writeonly").  This feels somewhat awkward to me, since the readonly attribute is fairly specific and probably does rule out inaccessible memory access but again, lacking a way to indicate that inaccessible memory is not referenced, I think this is the assumption we need to make.

It is my understanding that the inaccessible memory attributes were originally added to aid with JIT optimization, but I intend to use them very soon with the constrained floating point intrinsics to model access to the FP environment.


Repository:
  rL LLVM

https://reviews.llvm.org/D26382

Files:
  include/llvm/Analysis/AliasAnalysis.h
  lib/Analysis/AliasAnalysis.cpp
  lib/Analysis/BasicAliasAnalysis.cpp
  test/Analysis/BasicAA/cs-cs.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26382.77129.patch
Type: text/x-patch
Size: 11587 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161108/cfba4fe5/attachment.bin>


More information about the llvm-commits mailing list