[ObjCARC Annotations] Added support for displaying the state of pointers at the botto...
authorMichael Gottesman <mgottesman@apple.com>
Tue, 26 Mar 2013 00:42:09 +0000 (00:42 +0000)
committerMichael Gottesman <mgottesman@apple.com>
Tue, 26 Mar 2013 00:42:09 +0000 (00:42 +0000)
commit26dbfb6a7882bc8f5d9364b4bec7ef1d339dd327
treeb3c67afe6fc3b797f1b9c0ea6cffed20d9261f91
parent7bef073622b95116598f16630c0a9a3265a743a8
[ObjCARC Annotations] Added support for displaying the state of pointers at the bottom/top of BBs of the ARC dataflow analysis for both bottomup and topdown analyses.

This will allow for verification and analysis of the merge function of
the data flow analyses in the ARC optimizer.

The actual implementation of this feature is by introducing calls to
the functions llvm.arc.annotation.{bottomup,topdown}.{bbstart,bbend}
which are only declared. Each such call takes in a pointer to a global
with the same name as the pointer whose provenance is being tracked and
a pointer whose name is one of our Sequence states and points to a
string that contains the same name.

To ensure that the optimizer does not consider these annotations in any
way, I made it so that the annotations are considered to be of IC_None
type.

A test case is included for this commit and the previous
ObjCARCAnnotation commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177952 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/ObjCARC/ObjCARCOpts.cpp
lib/Transforms/ObjCARC/ObjCARCUtil.cpp
test/Transforms/ObjCARC/arc-annotations.ll [new file with mode: 0644]