Commits

John McCall committed 0bc2c106ffd
Enable the autorelease reclaim optimization for real by not doing various dumb things that break it. Specifically, directly return the result of objc_autoreleaseReturnValue (so that we can actually tail call it) and substitute the result of objc_retainAutoreleasedReturnValue for the call result (so that we don't have instructions saving the call result interfering with the pattern being sniffed). I found both of those bugs by educated inspection, then spent a while debugging why it wasn't making my test case successfully reclaim. It turns out that the first autorelease reclaim attempt will always fail on x86-64 because the sniffing code finds the dyld stub; the optimization only actually works after objc_retainAutoreleaseReturnValue has been called at least once in that shared object. Fun times. rdar://16565958 Swift SVN r16351