History log of /external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
230768bd1316a012e88ac62689589fe5e2f10456 05-Sep-2012 Dan Gohman <gohman@apple.com> Make provenance checking conservative in cases when
pointers-to-strong-pointers may be in play. These can lead to retains and
releases happening in unstructured ways, foiling the optimizer. This fixes
rdar://12150909.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163180 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
40e466091e76f4608ad09789546d3012c8c11c3e 27-Aug-2012 Dan Gohman <gohman@apple.com> Don't use for loops for code that is only intended to execute once. No
intended functionality change. Thanks to Ahmed Charles for spotting it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162686 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
c72d3be38915728142d13f982eeef218e42f21aa 23-Jul-2012 Dan Gohman <gohman@apple.com> An objc_retain can serve as a may-use for a different pointer.
rdar://11931823.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160637 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
c8e41c591741b3da1077f7000274ad040bef8002 23-Jul-2012 Sylvestre Ledru <sylvestre@debian.org> Fix a typo (the the => the)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
58fb3401fa63174cd37281d167b16d90e84a47be 25-Jun-2012 Dan Gohman <gohman@apple.com> Fix the objc_autoreleasedReturnValue optimization code to locate
the call correctly even in the case where it is an invoke. This
fixes rdar://11714057.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159157 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
d9b0b025612992a0b724eeca8bdf10b1d7a5c355 02-Jun-2012 Benjamin Kramer <benny.kra@googlemail.com> Fix typos found by http://github.com/lyda/misspell-check

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
55dc5c77a33bff5a902fec1b2133620064e1a256 27-May-2012 Chris Lattner <sabre@nondot.org> Reimplement the intrinsic verifier to use the same table as Intrinsic::getDefinition,
making it stronger and more sane.

Delete the code from tblgen that produced the old code.

Besides being a path forward in intrinsic sanity, this also eliminates a bunch of
machine generated code that was compiled into Function.o


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157545 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
4c8f909cdf221195f1d306033a4f843c5a7ee81a 21-May-2012 Dan Gohman <gohman@apple.com> Mark an unreachable region of code with llvm_unreachable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157197 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
ce5d8b0d03b9c37727d08de4fa1bcc7be7ea8bb1 19-May-2012 Dan Gohman <gohman@apple.com> Fix replacing all the users of objc weak runtime routines
when deleting them. rdar://11434915.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157080 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
95b8cf1f11fa2582d05f87a83a580e92afd5500d 10-May-2012 Dan Gohman <gohman@apple.com> Fix the objc_storeStrong recognizer to stop before walking off the
end of a basic block if there's no store.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
b12af898c317e64bba3ac1692073c812503e01c4 09-May-2012 Craig Topper <craig.topper@gmail.com> Remove unused variable to get rid of warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156466 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
0daef3d90278d6c110f9af1e9f806fd05450ff48 09-May-2012 Dan Gohman <gohman@apple.com> Miscellaneous accumulated cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156445 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
4670dace66f5ef6ab0b153cd482b5bc827467c73 09-May-2012 Dan Gohman <gohman@apple.com> Fix objc_storeStrong pattern matching to catch a potential use of the
old value after the store but before it is released.
This fixes rdar:/11116986.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156442 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
447989cb680041ff484c8c00ee5b7135a9df6b3d 27-Apr-2012 Dan Gohman <gohman@apple.com> Miscellaneous accumulated cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155725 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
50ade659829269f0338cd1bfa0a574dcec62562e 25-Apr-2012 Dan Gohman <gohman@apple.com> Simplify the known retain count tracking; use a boolean state instead
of a precise count. Also, move RRInfo's Partial field into PtrState,
now that it won't increase the size.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155513 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
eeeb7752a8eb13f799d33046246b6826990119f1 25-Apr-2012 Dan Gohman <gohman@apple.com> Build custom predecessor and successor lists for each basic block.
These lists exclude invoke unwind edges and loop backedges which
are being ignored. This makes it easier to ignore them
consistently.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155500 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
8b74e5afda780d05a46c1a35f46ebfd625e41f1a 19-Apr-2012 Dan Gohman <gohman@apple.com> Avoid a bug in the path count computation, preventing an infinite
loop repeatedlt making the same change. This is for rdar://11256239.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
3b5b2a22ca8f5eddcaf322bdff4d0ad5ba342676 19-Apr-2012 Dan Gohman <gohman@apple.com> Don't crash on code where the user put __attribute__((constructor)) on
a function with arguments. This fixes rdar://11265785.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155073 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
d6bf201fa20a5cd3aa9f61767081d1d03d8aee3c 13-Apr-2012 Dan Gohman <gohman@apple.com> Add some comments, and fix a few places that missed setting Changed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154687 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
44234775486a0bd8fb6dae4048666ea5567caa11 13-Apr-2012 Dan Gohman <gohman@apple.com> Consider ObjC runtime calls objc_storeWeak and others which make a copy of
their argument as "escape" points for objc_retainBlock optimization.
This fixes rdar://11229925.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154682 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
6c189ecbe6d11583dc54289a2e8d8f35add01c82 13-Apr-2012 Dan Gohman <gohman@apple.com> Use the new Use-aware dominates method to apply the objc runtime
library return value optimization for phi uses. Even when the
phi itself is not dominated, the specific use may be dominated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154647 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
511568dd1f9863de1633b0db8bb105f783e8ac50 13-Apr-2012 Dan Gohman <gohman@apple.com> Don't move objc_autorelease calls past autorelease pool boundaries when
optimizing autorelease calls on phi nodes with null operands.
This fixes rdar://11207070.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
036ebfd87434bc30a0e51f4b9a3d55ab49ee5509 05-Apr-2012 Dan Gohman <gohman@apple.com> Fix accidentally inverted logic from r152803, and make the
testcase slightly less trivial. This fixes rdar://11171718.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154118 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
b54a5eda6d9a1f50c1861b53e19be84994e586ef 24-Mar-2012 Francois Pichet <pichet2000@gmail.com> Fix the MSVC build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
6fedb3c4016b8f706c472280a3a9b22430c73ef4 23-Mar-2012 Dan Gohman <gohman@apple.com> Don't convert objc_retainAutoreleasedReturnValue to objc_retain if it
is retaining the return value of an invoke that it immediately follows.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153344 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
fbab4a8c8a142502b7cdeb7112366f8560a94cec 23-Mar-2012 Dan Gohman <gohman@apple.com> It's not possible to insert code immediately after an invoke in the
same basic block, and it's not safe to insert code in the successor
blocks if the edges are critical edges. Splitting those edges is
possible, but undesirable, especially on the unwind side. Instead,
make the bottom-up code motion to consider invokes to be part of
their successor blocks, rather than part of their parent blocks, so
that it doesn't push code past them and onto the edges. This fixes
PR12307.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153343 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
c7f5c6e0e3a25aa5f6320766dd1bb29371e6948d 22-Mar-2012 Dan Gohman <gohman@apple.com> Refactor the code for visiting instructions out into helper functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153267 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
2453dff96a7251fde83a4396c0e4022486036adf 15-Mar-2012 Rafael Espindola <rafael.espindola@gmail.com> Short term fix for pr12270 before we change dominates to handle unreachable
code.
While here, reduce indentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152803 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
8b11fdd8bb78840937ceebdfe44397dd8d2697fd 15-Mar-2012 Dan Gohman <gohman@apple.com> When an invoke is marked with metadata indicating its unwind edge
should be ignored by ARC optimization, don't insert new ARC runtime
calls in the unwind destination.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
5992f67e683b665392f45b167fe5c9abd91455c9 09-Mar-2012 Dan Gohman <gohman@apple.com> When identifying exit nodes for the reverse-CFG reverse-post-order
traversal, consider nodes for which the only successors are backedges
which the traversal is ignoring to be exit nodes. This fixes a problem
where the bottom-up traversal was failing to visit split blocks along
split loop backedges. This fixes rdar://10989035.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152421 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
70e2968866aa09b4c164db77d310f5d43a588227 02-Mar-2012 Dan Gohman <gohman@apple.com> Fix an iterator invalidation problem. operator[] on a DenseMap
can insert a new element, invalidating iterators. Use find
instead, and handle the case where the key is not found explicitly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
22cc4ccc9ea4a45d1f529c1bf48d61a88d3615de 02-Mar-2012 Dan Gohman <gohman@apple.com> Misc micro-optimizations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
dbe266be35cfee0fbda5523ac578fef81e8fdfcc 17-Feb-2012 Dan Gohman <gohman@apple.com> Calls and invokes with the new clang.arc.no_objc_arc_exceptions
metadata may still unwind, but only in ways that the ARC
optimizer doesn't need to consider. This permits more
aggressive optimization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
a3b08d68bd281773b0300222edb4149abce4b4b8 13-Feb-2012 Dan Gohman <gohman@apple.com> Just like in regular escape analysis, loads and stores through
(but not of) a block pointer do not cause the block pointer to
escape. This fixes rdar://10803830.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
4d6ccb5f68cd7c6418a209f1fa4dbade569e4493 20-Jan-2012 David Blaikie <dblaikie@gmail.com> More dead code removal (using -Wunreachable-code)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
0cdece438972f4c670973d99d2c7743ab822de1a 19-Jan-2012 Dan Gohman <gohman@apple.com> Set the "tail" flag on pattern-matched objc_storeStrong calls.
rdar://10531041.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148490 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
2f77bbd1bffcc4715033fc6509a2b9f111432085 18-Jan-2012 Dan Gohman <gohman@apple.com> Add a depth limit to avoid runaway recursion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
1dae3e965cc0b113b437c2c836f6e3c28a5cdb53 18-Jan-2012 Dan Gohman <gohman@apple.com> Use llvm.global_ctors to locate global constructors instead
of recognizing them by name.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148416 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
2f6263c96a6ed234b8d314cc35c8e2fcc3e81ccc 17-Jan-2012 Dan Gohman <gohman@apple.com> Add a new ObjC ARC optimization pass to eliminate unneeded
autorelease push+pop pairs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
fdebc38523b397743973ff6a2d2e93b112dd96e5 17-Jan-2012 David Blaikie <dblaikie@gmail.com> Remove unreachable code. (replace with llvm_unreachable to help GCC where necessary)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148284 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
92180988a4495c9c41ff2d19f6e700cef0bf0b2c 14-Jan-2012 Dan Gohman <gohman@apple.com> Fix an unused variable warning that Chad noticed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148164 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
79522dc569d3fb51b4a12cdacf24b82e5d5992d2 13-Jan-2012 Dan Gohman <gohman@apple.com> Implement proper ObjC ARC objc_retainBlock "escape" analysis, so that
the optimizer doesn't eliminate objc_retainBlock calls which are needed
for their side effect of copying blocks onto the heap.
This implements rdar://10361249.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
483716015f436ba0218a097a85cccbe6164f9db9 21-Dec-2011 Dan Gohman <gohman@apple.com> Fix a copy+pasto. No testcase, because the symptoms of dereferencing
an invalid iterator aren't reproducible. rdar://10614085.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
f9096e450bb6047ab330c94749f5e80178a62b09 14-Dec-2011 Dan Gohman <gohman@apple.com> It turns out that clang does use pointer-to-function types to
point to ARC-managed pointers sometimes. This fixes rdar://10551239.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
59a1c93e955c366084742ceca65e7b1afd8772ac 12-Dec-2011 Dan Gohman <gohman@apple.com> When computing reverse-CFG reverse-post-order, skip backedges, as
detected in the forward-CFG DFS. This prevents the reverse-CFG from
visiting blocks inside loops after blocks that dominate them in the
case where loops have multiple exits.

No testcase, because this fixes a bug which in practice only shows
up in a full optimizer run, due to the use-list order.

This fixes rdar://10422791 and others.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
afee027766bbfbc1e3296cf742cdff4d3a60c857 12-Dec-2011 Dan Gohman <gohman@apple.com> Add a TODO comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146389 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
62e5b4064b3610317fbfde1ff6a0a5eca6aa09e0 12-Dec-2011 Dan Gohman <gohman@apple.com> Fix a copy+pasto in a comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
8a9eebe6b904afaf86cb64b9e09380b4d9b592a0 12-Dec-2011 Dan Gohman <gohman@apple.com> Use getArgOperand instead of getOperand on a call.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
28588ff7aa417eded80101ea8d7fe4c7dcd8a1c1 12-Dec-2011 Dan Gohman <gohman@apple.com> Inline SetSeqToRelease into its only caller, since it's more clear that way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
2e68beb36afad1fbf578b10a012e655690c47120 12-Dec-2011 Dan Gohman <gohman@apple.com> Fix omitted break statements in a switch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146380 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
a974beaa1f63394a67c38c66ff0f39a759c7998f 18-Oct-2011 Dan Gohman <gohman@apple.com> Teach the ARC optimizer about the !clang.arc.copy_on_escape metadata
tag on objc_retainBlock calls, which indicates that they may be
optimized away. rdar://10211286.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
90b8bcd33ab4fd7dd95bd1dc9a2d7d03dcd83ad6 17-Oct-2011 Dan Gohman <gohman@apple.com> Suppress partial retain+release elimination when there's a
possibility that it will span multiple CFG diamonds/triangles which
could have different controlling predicates. rdar://10282956


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142222 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
27e0666725c6558574cb7a55f8c91e7532e09548 30-Sep-2011 Dan Gohman <gohman@apple.com> When eliminating unnecessary retain+autorelease on return values,
handle the case where the retain is in a different basic block.
rdar://10210274.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140815 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
597fece886fb4551d1f26ec7749d86e89970d8c2 30-Sep-2011 Dan Gohman <gohman@apple.com> Don't eliminate objc_retainBlock calls on stack objects if the
objc_retainBlock call is potentially responsible for copying
the block to the heap to extend its lifetime. rdar://10209613.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
1d2fd75e3b60314210934078915aa573a2727854 14-Sep-2011 Dan Gohman <gohman@apple.com> Don't mark objc_retainBlock as nounwind. It calls user copy constructors
which could theoretically throw.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
211048286bef00ffcf04b1b3e1bb3de3de79965a 14-Sep-2011 Dan Gohman <gohman@apple.com> objc_retainBlock is not NoModRef because it can update forwarding pointers
in memory relevant to the optimizer. rdar://10050579.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139708 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
2bc3d52b9ab422ee9f7e42a1a4e3b818e623a5f7 12-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Change a bunch of isVolatile() checks to check for atomic load/store as well.

No tests; these changes aren't really interesting in the sense that the logic is the same for volatile and atomic.

I believe this completes all of the changes necessary for the optimizer to handle loads and stores correctly. I'm going to try and come up with some additional testing, though.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139533 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
89d4411cef736898047aa7e3bc159da39cacf8e6 25-Aug-2011 Bill Wendling <isanbard@gmail.com> When inserting new instructions, use getFirstInsertionPt instead of
getFirstNonPHI so that it will skip over the landingpad instructions as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
d446460f42a75b3e5f6234e7ba3bb1ccf7894c9f 22-Aug-2011 Dan Gohman <gohman@apple.com> Add a comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138243 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
1b31ea8f935d4b643abf100c4943180c9ed8ba1a 22-Aug-2011 Dan Gohman <gohman@apple.com> Constant pointers to objects don't need reference counting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138242 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
e6d5e88c1230eae7056a5cd6238e86c00cdff72f 19-Aug-2011 Dan Gohman <gohman@apple.com> Track a retain+release nesting level independently of the
known-incremented level, because the two concepts can be used
to prove the saftey of a retain+release removal in different
ways.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
b48ef3a3ec7f527b0c76e7fbb37bbaac63b7c6aa 18-Aug-2011 Dan Gohman <gohman@apple.com> Make it clear that this code is iterating in reverse order through the array.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
126a54f1fa233d9da377a3e9f2ae85ff5fe34d9f 12-Aug-2011 Dan Gohman <gohman@apple.com> Don't convert objc_autoreleaseReturnValue to objc_autorelease if the result
is returned through a bitcast.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
a7f7db2ebd4d3ca5c4e50cb2f9047dd85a34c6c8 12-Aug-2011 Dan Gohman <gohman@apple.com> Don't let arbitrary calls disrupt nested retain+release pairs if
the retains and releases all use the same SSA pointer value.

Also, don't let CFG hazards disrupt nested retain+release pair
optimizations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137399 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
d8e48c48215c8aaa87b19245efac8a490c693d17 12-Aug-2011 Dan Gohman <gohman@apple.com> Use an actual reverse-CFG reverse-postorder for the bottom-up traversal,
rather than plain postorder, so that CFG constructs like single-exit loops
are reliably visited in a sensible order.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137398 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
fa7eed1f8eee4fd3839e589c3e0e84f79d248c8a 11-Aug-2011 Dan Gohman <gohman@apple.com> Fix typos in comments, and delete an unused function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
a81388fb4ab78cf85019840a27057b185f828ad1 04-Aug-2011 Evan Cheng <evan.cheng@apple.com> Fix an obvious type. Patch by Ivan Krasin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
4428069f10ac6e7efb55826437c82428d4bbe03e 23-Jul-2011 Dan Gohman <gohman@apple.com> Move the last uses of RetainFunc etc. over to using getRetainCallee() etc.
so that a declaration for objc_retain is created when needed if it doesn't
already exist. rdar://9825114.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
db125cfaf57cc83e7dd7453de2d509bc8efd0e5e 18-Jul-2011 Chris Lattner <sabre@nondot.org> land David Blaikie's patch to de-constify Type, with a few tweaks.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
a3efbb15ddd5aa9006564cd79086723640084878 15-Jul-2011 Jay Foad <jay.foad@gmail.com> Convert CallInst and InvokeInst APIs to use ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
5fdd6c8793462549e3593890ec61573da06e3346 12-Jul-2011 Jay Foad <jay.foad@gmail.com> Second attempt at de-constifying LLVM Types in FunctionType::get(),
StructType::get() and TargetData::getIntPtrType().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134982 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
2280ebd61416b73d0b6137f275b25af82e268d1f 12-Jul-2011 Bill Wendling <isanbard@gmail.com> Revert r134893 and r134888 (and related patches in other trees). It was causing
an assert on Darwin llvm-gcc builds.

Assertion failed: (castIsValid(op, S, Ty) && "Invalid cast!"), function Create, file /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.llvm-gcc-i386-darwin9-RA/llvm.src/lib/VMCore/Instructions.cpp, li\
ne 2067.
etc.

http://smooshlab.apple.com:8013/builders/llvm-gcc-i386-darwin9-RA/builds/2354

--- Reverse-merging r134893 into '.':
U include/llvm/Target/TargetData.h
U include/llvm/DerivedTypes.h
U tools/bugpoint/ExtractFunction.cpp
U unittests/Support/TypeBuilderTest.cpp
U lib/Target/ARM/ARMGlobalMerge.cpp
U lib/Target/TargetData.cpp
U lib/VMCore/Constants.cpp
U lib/VMCore/Type.cpp
U lib/VMCore/Core.cpp
U lib/Transforms/Utils/CodeExtractor.cpp
U lib/Transforms/Instrumentation/ProfilingUtils.cpp
U lib/Transforms/IPO/DeadArgumentElimination.cpp
U lib/CodeGen/SjLjEHPrepare.cpp
--- Reverse-merging r134888 into '.':
G include/llvm/DerivedTypes.h
U include/llvm/Support/TypeBuilder.h
U include/llvm/Intrinsics.h
U unittests/Analysis/ScalarEvolutionTest.cpp
U unittests/ExecutionEngine/JIT/JITTest.cpp
U unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp
U unittests/VMCore/PassManagerTest.cpp
G unittests/Support/TypeBuilderTest.cpp
U lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp
U lib/Target/Blackfin/BlackfinIntrinsicInfo.cpp
U lib/VMCore/IRBuilder.cpp
G lib/VMCore/Type.cpp
U lib/VMCore/Function.cpp
G lib/VMCore/Core.cpp
U lib/VMCore/Module.cpp
U lib/AsmParser/LLParser.cpp
U lib/Transforms/Utils/CloneFunction.cpp
G lib/Transforms/Utils/CodeExtractor.cpp
U lib/Transforms/Utils/InlineFunction.cpp
U lib/Transforms/Instrumentation/GCOVProfiling.cpp
U lib/Transforms/Scalar/ObjCARC.cpp
U lib/Transforms/Scalar/SimplifyLibCalls.cpp
U lib/Transforms/Scalar/MemCpyOptimizer.cpp
G lib/Transforms/IPO/DeadArgumentElimination.cpp
U lib/Transforms/IPO/ArgumentPromotion.cpp
U lib/Transforms/InstCombine/InstCombineCompares.cpp
U lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
U lib/Transforms/InstCombine/InstCombineCalls.cpp
U lib/CodeGen/DwarfEHPrepare.cpp
U lib/CodeGen/IntrinsicLowering.cpp
U lib/Bitcode/Reader/BitcodeReader.cpp



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
f362affa3a695164a94d275fb44d18f44ebb855a 11-Jul-2011 Jay Foad <jay.foad@gmail.com> De-constify Types in FunctionType::get().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134888 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
c4bcd4d964327e52ceadcc9be270718d758f8535 21-Jun-2011 Dan Gohman <gohman@apple.com> Completely short-circuit out ARC optimization if the ARC runtime
functions do not appear in the module.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
0860d0ba2f14e62572434cd159a086f91b20895d 16-Jun-2011 Dan Gohman <gohman@apple.com> Fix ARCOpt to insert releases on both successors of an invoke rather
than trying to insert them immediately after the invoke.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/ObjCARC.cpp
9fbd318d36e618fb08fb53bb48b7c848e617a8a7 16-Jun-2011 John McCall <rjmccall@apple.com> The ARC language-specific optimizer. Credit to Dan Gohman.



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