History log of /external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4c5e43da7792f75567b693105cc53e3f1992ad98 08-Apr-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master llvm for rebase to r233350

Change-Id: I07d935f8793ee8ec6b7da003f6483046594bca49
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
ebe69fe11e48d322045d5949c83283927a0d790b 23-Mar-2015 Stephen Hines <srhines@google.com> Update aosp/master LLVM for rebase to r230699.

Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
37ed9c199ca639565f6ce88105f9e39e898d82d0 01-Dec-2014 Stephen Hines <srhines@google.com> Update aosp/master LLVM for rebase to r222494.

Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
dce4a407a24b04eebc6a376f8e62b41aaa7b071f 29-May-2014 Stephen Hines <srhines@google.com> Update LLVM for 3.5 rebase (r209712).

Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
36b56886974eae4f9c5ebc96befd3e7bfe5de338 24-Apr-2014 Stephen Hines <srhines@google.com> Update to LLVM 3.5a.

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
b50063e0ce18983513d6241c3bd638b074a98e31 01-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196004:
------------------------------------------------------------------------
r196004 | void | 2013-11-30 19:36:07 -0800 (Sat, 30 Nov 2013) | 3 lines

Use 'unsigned char' to get this past gcc error message:

error: invalid conversion from 'unsigned char' to '{anonymous}::Sequence'
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@196005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
f23af8bfd8609b9594947876209c3f0de070ea4f 05-Nov-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc] Convert the one directional retain/release relation assert to a conditional check + fail.

Due to the previously added overflow checks, we can have a retain/release
relation that is one directional. This occurs specifically when we run into an
additive overflow causing us to drop state in only one direction. If that
occurs, we should bail and not optimize that retain/release instead of
asserting.

Apologies for the size of the testcase. It is necessary to cause the additive
cfg overflow to trigger.

rdar://15377890

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
be0857051fee0a782e0a2d249b37db166cd28e1c 04-Sep-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc] Remove dead code from previous commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
72196ab082c1f2132d209e61d93d084d55fb6c18 04-Sep-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc] Turn off the objc_retainBlock -> objc_retain optimization.

The reason that I am turning off this optimization is that there is an
additional case where a block can escape that has come up. Specifically, this
occurs when a block is used in a scope outside of its current scope.

This can cause a captured retainable object pointer whose life is preserved by
the objc_retainBlock to be deallocated before the block is invoked.

An example of the code needed to trigger the bug is:

----
\#import <Foundation/Foundation.h>
int main(int argc, const char * argv[]) {
void (^somethingToDoLater)();

{
NSObject *obj = [NSObject new];

somethingToDoLater = ^{
[obj self]; // Crashes here
};
}

NSLog(@"test.");

somethingToDoLater();
return 0;
}
----

In the next commit, I remove all the dead code that results from this.

Once I put in the fixing commit I will bring back the tests that I deleted in
this commit.

rdar://14802782.
rdar://14868830.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
3ed7576a3bfd8e4e76e7b8f7ae76422c1ae48f72 10-Aug-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc] Track if we encountered an additive overflow while computing {TopDown,BottomUp}PathCounts and do nothing if it occurred.

I fixed the aforementioned problems that came up on some of the linux boxes.
Major thanks to Nick Lewycky for his help debugging!

rdar://14590914

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
35b6edfbeaf0f82954e0b308e1c6693e3d39a9e1 08-Aug-2013 Michael Gottesman <mgottesman@apple.com> Revert "[objc-arc] Track if we encountered an additive overflow while computing {TopDown,BottomUp}PathCounts and do nothing if it occured."

This reverts commit r187941.

The commit was passing on my os x box, but it is failing on some non-osx
platforms. I do not have time to look into it now, so I am reverting and will
recommit after I figure this out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187946 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
7f1a7d4137ce535558480f8e044238f35a8654e6 08-Aug-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc] Track if we encountered an additive overflow while computing {TopDown,BottomUp}PathCounts and do nothing if it occured.

rdar://14590914

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187941 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
b0fd15f645a05480467136f94d5e5baacd1905a9 08-Aug-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc] Change 4 iterator methods which return const_iterators to be const methods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187940 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
a0ec3f9b7b826b9b40b80199923b664bad808cce 14-Jul-2013 Craig Topper <craig.topper@gmail.com> Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
4ee7e47a87a894bd1ad9a1406cb5f21d8b988787 06-Jul-2013 Michael Gottesman <mgottesman@apple.com> Removed trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185743 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
50951c7f7985aa0d9ce54f573a0dcfdb7c97df74 06-Jul-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc] Updated ObjCARCOpts to use ARCRuntimeEntryPoints.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185741 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
5b3d7112401a81603157910672e5011a3d9cee18 21-Jun-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc-opts] Make IsTrackingImpreciseReleases a const method.

Thanks to Bill Wendling for pointing this out!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184593 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
5a18572320542a66778f20fb624310fe7662cc85 21-Jun-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc-opts] Now that PtrState.RRI is encapsulated in PtrState, make PtrState.RRI private and delete the TODO.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184587 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
72507101f74dee7295a13ff6f99cfc8f63ff8984 21-Jun-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc-opts] Encapsulated PtrState.RRI.{Calls,ReverseInsertPts} into several methods on PtrState.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184586 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
65af4b5333f539b9e572ebb9c4d4e97a897e5130 21-Jun-2013 Michael Gottesman <mgottesman@apple.com> [objcarcopts] Encapsulated PtrState.RRI.IsTrackingImpreciseRelease() => PtrState.IsTrackingImpreciseRelease().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
a211578aa23cccc6b039d290fa46541a6ef1360e 21-Jun-2013 Michael Gottesman <mgottesman@apple.com> [objcarcopts] Encapsulate PtrState.RRI.CFGHazardAfflicted via methods PtrState.{IsCFGHazardAfflicted,SetCFGHazardAfflicted}.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184582 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
3b5714de9db729d2bd82754005f3e1d2ca400f57 21-Jun-2013 Michael Gottesman <mgottesman@apple.com> [objcarcopts] Encapsulate PtrState.RRI.ReleaseMetadata into the methods PtrState.GetReleaseMetadata() and PtrState.SetReleaseMetadata().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
8fcf2ca81c32fc3a60f489c56b565d6bdbb7c419 21-Jun-2013 Michael Gottesman <mgottesman@apple.com> [objcarcopts] Encapsulate PtrState.RRI.IsTailCallRelease into the method PtrState.IsTailCallRelease() and PtrState.SetTailCallRelease().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184533 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
00dacc44f5f3f3a67d4c7af6146d5584f709bc78 21-Jun-2013 Michael Gottesman <mgottesman@apple.com> [obcjarcopts] Encapsulate PtrState.RRI.KnownSafe in the methods PtrState.IsKnownSafe and PtrState.SetKnownSafe.

This is apart of a series of patches to encapsulate PtrState.RRI and
make PtrState.RRI a private field of PtrState.

*NOTE* This is actually the second commit in the patch stream. I should
have put this note on the first such commit r184528.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
36d9cda15d5a1eb81a5641935be84d342127698d 21-Jun-2013 Michael Gottesman <mgottesman@apple.com> [objcarcopts] Some more minor code cleanups/comment additions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184531 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
817ef2d78e9ea9671ebd50913f9a0baf3ad70d93 21-Jun-2013 Michael Gottesman <mgottesman@apple.com> [objcarcopts] Refactor out the RRInfo merging code from PtrState into RRInfo::Merge.

I also added some comments and performed minor code cleanups.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184528 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
9eb856bc295eabe1ebff0325158e65050deddd56 07-Jun-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc] Ensure that the cfg path count does not overflow when we multiply TopDownPathCount/BottomUpPathCount.

rdar://12480535

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183489 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
7932798384725834bd77f934e3408e5cca29c131 24-May-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc] KnownSafe does not imply that it is safe to perform code motion across CFG edges since even if it is safe to remove RR pairs, we may still be able to move a retain/release into a loop.

rdar://13949644

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182670 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
35e88e57eacdb8edff3b5890e8271a805f250606 24-May-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc] Make sure that multiple owners is propogated correctly through the pass via the usage of a global data structure.

rdar://13750319

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182669 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
e5b97900b2f0d18dbb067b81f5943940e492d7de 23-May-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc] Fixed number of prefixing slashes in some comments in a function from 3 to 2 to match the rest of ObjCARCOpts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182557 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
c292e68d43daf9dfb6a5c843ea11a25702d9d8a7 15-May-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc] Fixed a spelling error and made the statistic descriptions be consistent about their usage of periods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181901 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
cbe5f4c5d7a04d15dcc89a3f1de0936e5db54da7 14-May-2013 Michael Gottesman <mgottesman@apple.com> Removed trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
dba53a8c9d4ece0bf44acbf5fce871f2e754d97d 14-May-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc-opts] Added debug statements when we set and unset whether a pointer is known positive.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181745 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
acfb3584c58159ec20a8379c864c9d644f8d967e 14-May-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc-opts] In the presense of an alloca unconditionally remove RR pairs if and only if we are both KnownSafeBU/KnownSafeTD rather than just either or.

In the presense of a block being initialized, the frontend will emit the
objc_retain on the original pointer and the release on the pointer loaded from
the alloca. The optimizer will through the provenance analysis realize that the
two are related (albiet different), but since we only require KnownSafe in one
direction, will match the inner retain on the original pointer with the guard
release on the original pointer. This is fixed by ensuring that in the presense
of allocas we only unconditionally remove pointers if both our retain and our
release are KnownSafe (i.e. we are KnownSafe in both directions) since we must
deal with the possibility that the frontend will emit what (to the optimizer)
appears to be unbalanced retain/releases.

An example of the miscompile is:

%A = alloca
retain(%x)
retain(%x) <--- Inner Retain
store %x, %A
%y = load %A
... DO STUFF ...
release(%y)
call void @use(%x)
release(%x) <--- Guarding Release

getting optimized to:

%A = alloca
retain(%x)
store %x, %A
%y = load %A
... DO STUFF ...
release(%y)
call void @use(%x)

rdar://13750319

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181743 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
9b5e6c0943dcfced64980240e25427cdc06c9bad 13-May-2013 Matt Beaumont-Gay <matthewbg@google.com> Move a couple more statistics inside '#ifndef NDEBUG'.

Suppresses an unused-variable warning in -Asserts builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181733 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
774a8cf2f5a5f8cd580c71f5eb3055a293917102 13-May-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc-opts] Add comment to BBState making it clear that get{TopDown,BottomUp}PtrState will create a new PtrState object if it does not find a PtrState for Arg.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
fa709768b91df14bb7b5606700d92c3c10aba625 13-May-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc] Move the before optimization statistics gathering phase out of OptimizeIndividualCalls.

This makes the statistics gathering completely independent of the actual
optimization occuring, preventing any sort of bleeding over from occuring.

Additionally, it simplifies a switch statement in the non-statistic gathering case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
5c332dbd30d9398ed25b30c3080506f7b8e92290 05-May-2013 Dmitri Gribenko <gribozavr@gmail.com> Add ArrayRef constructor from None, and do the cleanups that this constructor enables

Patch by Robert Wilhelm.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
f4fc9b175306a49c3d3c72f1e9e08f8ea2038c51 29-Apr-2013 Michael Gottesman <mgottesman@apple.com> Add in some conditional compilation in order to silence an unused variable warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180700 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
f11a6856cc28875133cef0f7bbad2b7de3a83776 29-Apr-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc] Apply the RV optimization to retains next to calls in ObjCARCContract instead of ObjCARCOpts.

Turning retains into retainRV calls disrupts the data flow analysis in
ObjCARCOpts. Thus we move it as late as we can by moving it into
ObjCARCContract.

We leave in the conversion from retainRV -> retain in ObjCARCOpt since
it enables the dataflow analysis.

rdar://10813093

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
fe7ea985fac4abb4056fa5f020449a2802a81604 29-Apr-2013 Michael Gottesman <mgottesman@apple.com> Added statistics to count the number of retains/releases before/after optimization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
2088d917922d02b452608e2c46c5ee9886a723dd 29-Apr-2013 Michael Gottesman <mgottesman@apple.com> Removed trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180696 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
210a496a6a43726e65bf0b07db98a84c308a7be1 29-Apr-2013 Michael Gottesman <mgottesman@apple.com> Fix for r180693. = /.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
e056397e8115a8ef1b22908695fa45d6dfee9d71 29-Apr-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc-annotations] Moved the disabling of call movement to ConnectTDBUTraversals so that I can prevent Changed = true from being set. This prevents an infinite loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180693 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
d15d29e7c8290ff27457d5244360f894d806b083 26-Apr-2013 Michael Gottesman <mgottesman@apple.com> Revert "[objc-arc] Added ImpreciseAutoreleaseSet to track autorelease calls that were once autoreleaseRV instructions."

This reverts commit r180222.

I think this might tie in with a different problem which will require a
different approach potentially. I am reverting this in the case I need to go
down that second path.

My apologies for the noise. = /.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
3f4613310deac06c5a43c6ff76e7f9ab1e93503c 25-Apr-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc] Added ImpreciseAutoreleaseSet to track autorelease calls that were once autoreleaseRV instructions.

Due to the semantics of ARC, we must be extremely conservative with autorelease
calls inserted by the frontend since ARC gaurantees that said object will be in
the autorelease pool after that point, an optimization invariant that the
optimizer must respect.

On the other hand, we are allowed significantly more flexibility with
autoreleaseRV instructions.

Often times though this flexibility is disrupted by early transformations which
transform objc_autoreleaseRV => objc_autorelease if said instruction is no
longer being used as part of an RV pair (generally due to inlining). Since we
can not tell the difference in between an autorelease put into place by the
frontend and one created through said ``strength reduction'' we can not perform
these optimizations.

The addition of this set gets around said issues by allowing us to differentiate
in between said two cases.

rdar://problem/13697741.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180222 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
0eb5e45e4bd0099187009ef43aa63d2cb861560a 25-Apr-2013 Michael Gottesman <mgottesman@apple.com> Fixed comment typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
fca9d95523dd290209bf15e0ef9d9aa373058636 21-Apr-2013 Michael Gottesman <mgottesman@apple.com> When we strength reduce an objc_retainBlock call to objc_retain, increment NumPeeps and make sure that Changed is set to true.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179968 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
8c87177f2cd2fba8adbd5ccd1ebaad7b4112bace 21-Apr-2013 Michael Gottesman <mgottesman@apple.com> Fixed comment typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
d4adf8a88618e78b652297e07ec1abc34df6cd78 21-Apr-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc] Fixed typo in debug message.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
ee37359762d32db7885256a003a03a5f70860181 21-Apr-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc] Fixed comment typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179965 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
9f2b618ac5064d23b91c56fe8e7940a0be41371c 21-Apr-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc] Refactored OptimizeReturns so that it uses continue instead of a large multi-level nested if statement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
7e48a92829a1c607c193758d55e7058599e7416f 21-Apr-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc] Added debug statement saying when we are resetting a sequence's progress.

This will make it clearer when we are actually resetting a sequence's progress
vs just changing state. This is an important distinction because the former case
clears any pointers that we are tracking while the later does not.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179963 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
0556900b260eed881a2f47a2b5267ae3a7cc7ae0 18-Apr-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc] Do not mismatch up retains inside a for loop with releases outside said for loop in the presense of differing provenance caused by escaping blocks.

This occurs due to an alloca representing a separate ownership from the
original pointer. Thus consider the following pseudo-IR:

objc_retain(%a)
for (...) {
objc_retain(%a)
%block <- %a
F(%block)
objc_release(%block)
}
objc_release(%a)

From the perspective of the optimizer, the %block is a separate
provenance from the original %a. Thus the optimizer pairs up the inner
retain for %a and the outer release from %a, resulting in segfaults.

This is fixed by noting that the signature of a mismatch of
retain/releases inside the for loop is a Use/CanRelease top down with an
None bottom up (since bottom up the Retain-CanRelease-Use-Release
sequence is completed by the inner objc_retain, but top down due to the
differing provenance from the objc_release said sequence is not
completed). In said case in CheckForCFGHazards, we now clear the state
of %a implying that no pairing will occur.

Additionally a test case is included.

rdar://12969722

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179747 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
8a709208ede8eb387a2911c5ba11e5acf8cc69ae 18-Apr-2013 Michael Gottesman <mgottesman@apple.com> Removed trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179746 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
f92bf40cedf2204211b96d27e89e0e2f0170b78d 17-Apr-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc] Added annotation option to only emit annotations for a specific ssa identifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
9739b65264f67fd9f42ae53b0cca886e94ff238c 17-Apr-2013 Michael Gottesman <mgottesman@apple.com> Fixed typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
b271b120d064f6944435de83f3db971d5b2d3fa7 17-Apr-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc] Added descriptions for EnableARCAnnotations, EnableCheckForCFGHazards, EnableARCOptimizations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179718 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
ba5d950518b13353028ea958714fbadca032e1a3 17-Apr-2013 Michael Gottesman <mgottesman@apple.com> [objc-arc] Added an option to arc-annotations for turning off CheckForCFGHazard.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179717 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
58ddf528927a57c4f92ef12513bfef3422318b77 10-Apr-2013 Bob Wilson <bob.wilson@apple.com> Fix some comment typos.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179132 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
310f2665e8fc4f3b5fa70d3e935f00d19cae3f2f 06-Apr-2013 Michael Gottesman <mgottesman@apple.com> Removed trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
e8b3c2e48aa597f08d029ecaed6c1f7ae3a1d111 06-Apr-2013 Michael Gottesman <mgottesman@apple.com> An objc_retain can serve as a use for a different pointer.

This is the counterpart to commit r160637, except it performs the action
in the bottomup portion of the data flow analysis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178922 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
e7ce2b3f75da1cdb657753592b73cda4252817ef 06-Apr-2013 Michael Gottesman <mgottesman@apple.com> Properly model precise lifetime when given an incomplete dataflow sequence.

The normal dataflow sequence in the ARC optimizer consists of the following
states:

Retain -> CanRelease -> Use -> Release

The optimizer before this patch stored the uses that determine the lifetime of
the retainable object pointer when it bottom up hits a retain or when top down
it hits a release. This is correct for an imprecise lifetime scenario since what
we are trying to do is remove retains/releases while making sure that no
``CanRelease'' (which is usually a call) deallocates the given pointer before we
get to the ``Use'' (since that would cause a segfault).

If we are considering the precise lifetime scenario though, this is not
correct. In such a situation, we *DO* care about the previous sequence, but
additionally, we wish to track the uses resulting from the following incomplete
sequences:

Retain -> CanRelease -> Release (TopDown)
Retain <- Use <- Release (BottomUp)

*NOTE* This patch looks large but the most of it consists of updating
test cases. Additionally this fix exposed an additional bug. I removed
the test case that expressed said bug and will recommit it with the fix
in a little bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178921 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
5c762e0c2511b72867559bca567cdb4c85c9ed01 05-Apr-2013 Michael Gottesman <mgottesman@apple.com> Added two debug logging messages to VisitInstructionsTopDown to match VisitInstructionsBottomUp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
5789a86f5cf9eada7759dc077b58da3970721815 05-Apr-2013 Michael Gottesman <mgottesman@apple.com> Cleaned up whitespace and made debug logging less verbose.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178893 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
296ffab5625fe83d804f1dd5d5517954082b6622 04-Apr-2013 Michael Gottesman <mgottesman@apple.com> Refactored out the helper method FindPredecessorAutoreleaseWithSafePath from ObjCARCOpt::OptimizeReturns.

Now ObjCARCOpt::OptimizeReturns is easy to read and reason about.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178715 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
681f258ae33c114c1525114e6be882ee281be3a6 04-Apr-2013 Michael Gottesman <mgottesman@apple.com> Refactored out the helper function FindPredecessorRetainWithSafePath from ObjCARCOpt::OptimizeReturns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178714 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
9bede89bbe04e49953ce373620355d2de4b0c084 04-Apr-2013 Michael Gottesman <mgottesman@apple.com> Small cleanups.

Cleaned up trailing whitespace and added extra slashes in front of a
function level comment so that it follow the convention of having 3
slashes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178712 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
ca4cb5b6df545517e31a374c7bd8a689aea9a962 04-Apr-2013 Michael Gottesman <mgottesman@apple.com> Refactored out a part of ObjCARCOpt::OptimizeReturns into its own method HasSafePathToPredecessorCall.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
60d1c0bca35d78feb780ac831d42ba1688d73461 04-Apr-2013 Michael Gottesman <mgottesman@apple.com> Removed an old comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
7a424bd5deac40ad7520a9a31104723c6f08182b 04-Apr-2013 Michael Gottesman <mgottesman@apple.com> Clean up arc annotations by moving the top/bottom BB annotations into conditional macros that no-op in Release mode instead of #ifdef sections of the code.

This is to follow the example of the DEBUG macro.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
a67a20c95f08b31b499d06d1fa47bdf14f9d40d0 03-Apr-2013 Michael Gottesman <mgottesman@apple.com> Remove an optimization where we were changing an objc_autorelease into an objc_autoreleaseReturnValue.

The semantics of ARC implies that a pointer passed into an objc_autorelease
must live until some point (potentially down the stack) where an
autorelease pool is popped. On the other hand, an
objc_autoreleaseReturnValue just signifies that the object must live
until the end of the given function at least.

Thus objc_autorelease is stronger than objc_autoreleaseReturnValue in
terms of the semantics of ARC* implying that performing the given
strength reduction without any knowledge of how this relates to
the autorelease pool pop that is further up the stack violates the
semantics of ARC.

*Even though objc_autoreleaseReturnValue if you know that no RV
optimization will occur is more computationally expensive.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
003d5f946d3ad44cb42f7d25b0c40f04e9a5a0a2 03-Apr-2013 Michael Gottesman <mgottesman@apple.com> Improved comment. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
ae07bf3ad309de598258fbb4f2ebae8d0fdaa422 29-Mar-2013 Michael Gottesman <mgottesman@apple.com> Removed trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178329 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
d02e46be1a3be9e8b871bdb0028fa5b9a2593848 29-Mar-2013 Michael Gottesman <mgottesman@apple.com> Removed dead code from ObjCARCOpts relating to tracking objc_retainBlocks through the ARC Dataflow analysis. By the time we get to the ARC dataflow analysis, any objc_retainBlock calls are not optimizable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178306 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
0d92a3c600b453f3aa4f50ba0189ccb1dbbc1580 28-Mar-2013 Michael Gottesman <mgottesman@apple.com> [ObjCARC] Strength reduce objc_retainBlock -> objc_retain if the objc_retainBlock is optimizable.

If an objc_retainBlock has the copy_on_escape metadata attached to it
AND if the block pointer argument only escapes down the stack, we are
allowed to strength reduce the objc_retainBlock to to an objc_retain and
thus optimize it.

Current there is logic in the ARC data flow analysis to handle
this case which is complicated and involved making distinctions in
between objc_retainBlock and objc_retain in certain places and
considering them the same in others.

This patch simplifies said code by:

1. Performing the strength reduction in the initial ARC peephole
analysis (ObjCARCOpts::OptimizeIndividualCalls).

2. Changes the ARC dataflow analysis (which runs after the peephole
analysis) to consider all objc_retainBlock calls to not be optimizable
(since if the call was optimizable, we would have strength reduced it
already).

This patch leaves in the infrastructure in the ARC dataflow analysis to
handle this case, which due to 2 will just be dead code. I am doing this
on purpose to separate the removal of the old code from the testing of
the new code.

<rdar://problem/13249661>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178284 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
26dbfb6a7882bc8f5d9364b4bec7ef1d339dd327 26-Mar-2013 Michael Gottesman <mgottesman@apple.com> [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
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
7bef073622b95116598f16630c0a9a3265a743a8 26-Mar-2013 Michael Gottesman <mgottesman@apple.com> [ObjCARC Annotations] Implemented ARC annotation metadata to expose the ARC data flow analysis state in the IR via metadata.

Previously the inner works of the data flow analysis in ObjCARCOpts was hard to
get out of the optimizer for analysis of bugs or testing. All of the current ARC
unit tests are based off of testing the effect of the data flow
analysis (i.e. what statements are removed or moved, etc.). This creates
weakness in the current unit testing regimem since we are not actually testing
what effects various instructions have on the modeled pointer state.
Additionally in order to analyze a bug in the optimizer, one would need to track
by hand what the optimizer was actually doing either through use of DEBUG
statements or through the usage of a debugger, both yielding large loses in
developer productivity.

This patch deals with these two issues by providing ARC annotation
metadata that annotates instructions with the state changes that they cause in
various pointers as well as provides metadata to annotate provenance sources.

Specifically, we introduce the following metadata types:

1. llvm.arc.annotation.bottomup.
2. llvm.arc.annotation.topdown.
3. llvm.arc.annotation.provenancesource.

llvm.arc.annotation.{bottomup,topdown}: These annotations describes a state
change in a pointer when we are visiting instructions bottomup/topdown
respectively. The output format for both is the same:

!1 = metadata !{metadata !"(test,%x)", metadata !"S_Release", metadata !"S_Use"}

The first element is a string tuple with the following format:

(function,variable name)

The second two elements of the metadata show the previous state of the
pointer (in this case S_Release) and the new state of the pointer (S_Use). We
write the metadata in such a manner to ensure that it is easy for outside tools
to parse. This is important since I am currently working on a tool for taking
this information and pretty printing it besides the IR and that can be used for
LIT style testing via the generation of an index.

llvm.arc.annotation.provenancesource: This metadata is used to annotate
instructions which act as provenance sources, i.e. ones that introduce a
new (from the optimizer's perspective) non-argument pointer to track. This
enables cross-referencing in between provenance sources and the state changes
that occur to them.

This is still a work in progress. Additionally I plan on committing
later today additions to the annotations that annotate at the top/bottom
of basic blocks the state of the various pointers being tracked.

*NOTE* The metadata support is conditionally compiled into libObjCARCOpts only
when we are producing a debug build of llvm/clang and even so are
disabled by default. To enable the annotation metadata, pass in
-enable-objc-arc-annotations to opt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177951 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
f0a15d88afce23453ff55894400035014ad46a15 25-Mar-2013 Michael Gottesman <mgottesman@apple.com> Changed isNullOrUndef => IsNullOrUndef and isNoopInstruction => IsNoopInstruction so that all helper functions are named similarly in ObjCARC.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
31881c235f54b754e55157966386f31e0ce7cafb 23-Mar-2013 Michael Gottesman <mgottesman@apple.com> Change method name ClearRefCount => ClearKnownPositiveRefCount to match the name of the member that it is modifying.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177818 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
4df66f74d9b4382a0091f4655152f70dd57adfb3 23-Mar-2013 Michael Gottesman <mgottesman@apple.com> Changed the method name PtrState.IsKnownIncremented() to PtrState.HasKnownPositiveRefCount().

Now said method matches namewise every other method which refers to
the member KnownPositiveRefCount of the class PtrState.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
1f9c4407c0e66f0c473ed5d6e3abcedda3a838c9 22-Mar-2013 John McCall <rjmccall@apple.com> Kill every call to @clang.arc.use in the ARC contract phase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
3603e9aa5e46923c44db1e6254f0393a2b0644e4 23-Feb-2013 Michael Gottesman <mgottesman@apple.com> Fixed a careless mistake.

rdar://13273675.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175939 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
65c46b0cff2a7bcefff9b58895cdf8d710e3b6f7 07-Feb-2013 Michael Gottesman <mgottesman@apple.com> Moved some comments due to the recent refactoring of ObjCARC.

1. Moved a comment from ObjCARCOpts.cpp -> ObjCARCContract.cpp.
2. Removed a comment from ObjCARCOpts.cpp that was already moved to
ObjCARCAliasAnalysis.h/.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174581 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
da6bf1d8bbf8e787f7c0edffbad40531dd520446 05-Feb-2013 Michael Gottesman <mgottesman@apple.com> Removed explicit inline as per the LLVM style guide.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174432 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
5500943771f53340e8f219496b512286e4f5b014 29-Jan-2013 Michael Gottesman <mgottesman@apple.com> Made certain small functions in PtrState inlined.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
485da648484e443f38c8ddbe5cb8ace07e2166e7 29-Jan-2013 Michael Gottesman <mgottesman@apple.com> Removed trailing comma in last element of enum declaration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173836 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
b82d200dcb748619e22491ecfb9662ae86d7dfd5 29-Jan-2013 Michael Gottesman <mgottesman@apple.com> Moved S_Stop back to its previous position in the sequence order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
02c953ea8b8130bd60fdacb97649d6344f1e8143 29-Jan-2013 Michael Gottesman <mgottesman@apple.com> Fixed a few debug messages and some 80+ violations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173832 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
a519c97b4278970b7104005205c6f42910cb9acb 29-Jan-2013 Michael Gottesman <mgottesman@apple.com> Added some periods to some comments and added an overload for operator<< for type Sequence so I can print out Sequences in debug statements.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
82b83011a1e330e41147dbad97e44939840ba755 29-Jan-2013 Michael Gottesman <mgottesman@apple.com> Changed DoesObjCBlockEscape => DoesRetainableObjPtrEscape so I can use it to perform escape analysis of other retainable object pointers in other locations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
09840daeefc1aa8760c535ded6a37eb4f8cd4eaa 29-Jan-2013 Timur Iskhodzhanov <timurrrr@google.com> Hopefully fix the Windows build failure introduced in r173769

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
9ab758b9bc2fe51af6dabbdeb30f4a2e600bdcd0 29-Jan-2013 Michael Gottesman <mgottesman@apple.com> Juggled Debug.h from ObjCARC.h to only the including cpp files that
actually have DEBUG statements. Also changed raw_ostream in said header
to be a forward declaration (removing an include).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
7a7102d17f979918042bc040e27288d64a6bea5f 29-Jan-2013 Michael Gottesman <mgottesman@apple.com> Sorted includes using utils/sort_includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173767 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
3a57c37964adfbbf83b4b309a2ceda43ba6d8231 29-Jan-2013 Michael Gottesman <mgottesman@apple.com> Extracted ObjCARCContract from ObjCARCOpts into its own file.

This also required adding 2x headers Dependency Analysis.h/Provenance Analysis.h
and a .cpp file DependencyAnalysis.cpp to unentangle the dependencies inbetween
ObjCARCContract and ObjCARCOpts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
6086847bfbc538b99305b4d7e0a53ab610f6a9bb 28-Jan-2013 Michael Gottesman <mgottesman@apple.com> Refactor ObjCARCAliasAnalysis into its own file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173662 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
3c67f1cd94760f879e0ec5407f0d1078bc51f9b4 28-Jan-2013 Michael Gottesman <mgottesman@apple.com> Refactored out pass ObjCARCAPElim from ObjCARCOpts.cpp => ObjCARCAPElim.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173654 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
6504255a2257c53df8ab191c1db4517139f5dc8c 28-Jan-2013 Michael Gottesman <mgottesman@apple.com> Extracted pass ObjCARCExpand from ObjCARC.cpp => ObjCARCExpand.cpp.

I also added the local header ObjCARC.h for common functions used by the
various passes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173651 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
24c4898973a074713201fb9351d302b9f7733e92 28-Jan-2013 Michael Gottesman <mgottesman@apple.com> Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173647 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp