summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/ObjCARC.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-11/+11
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Use the Attributes::get method which takes an AttrVal value directly to ↵Bill Wendling2012-10-161-27/+9
| | | | | | simplify the code a bit. No functionality change. llvm-svn: 166009
* Move the Attributes::Builder outside of the Attributes class and into its ↵Bill Wendling2012-10-151-9/+9
| | | | | | own class named AttrBuilder. No functionality change. llvm-svn: 165960
* Add an enum for the return and function indexes into the AttrListPtr object. ↵Bill Wendling2012-10-151-15/+23
| | | | | | This gets rid of some magic numbers. llvm-svn: 165924
* Attributes RewriteBill Wendling2012-10-151-9/+9
| | | | | | | | | | Convert the internal representation of the Attributes class into a pointer to an opaque object that's uniqued by and stored in the LLVMContext object. The Attributes class then becomes a thin wrapper around this opaque object. Eventually, the internal representation will be expanded to include attributes that represent code generation options, etc. llvm-svn: 165917
* Remove the bitwise assignment OR operator from the Attributes class. Replace ↵Bill Wendling2012-10-141-9/+16
| | | | | | it with the equivalent from the builder class. llvm-svn: 165895
* Use the enum value of the attributes when adding them to the attributes builder.Bill Wendling2012-10-091-9/+9
| | | | llvm-svn: 165494
* Fix. Apply the no capture attribute to the correct parameter.Bill Wendling2012-10-091-4/+7
| | | | llvm-svn: 165469
* Convert to using the Attributes::Builder class to create attributes.Bill Wendling2012-10-091-10/+25
| | | | llvm-svn: 165468
* Mark unimplemented copy constructors and copy assignment operators as ↵Craig Topper2012-09-181-3/+2
| | | | | | LLVM_DELETED_FUNCTION. llvm-svn: 164090
* Fix Doxygen issues:Dmitri Gribenko2012-09-141-4/+4
| | | | | | | | | | * wrap code blocks in \code ... \endcode; * refer to parameter names in paragraphs correctly (\arg is not what most people want -- it starts a new paragraph); * use \param instead of \arg to document parameters in order to be consistent with the rest of the codebase. llvm-svn: 163902
* Detect overflow in the path count computation. rdar://12277446.Dan Gohman2012-09-121-0/+13
| | | | llvm-svn: 163739
* Make provenance checking conservative in cases whenDan Gohman2012-09-041-37/+42
| | | | | | | | 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. llvm-svn: 163180
* Don't use for loops for code that is only intended to execute once. NoDan Gohman2012-08-271-6/+6
| | | | | | intended functionality change. Thanks to Ahmed Charles for spotting it. llvm-svn: 162686
* An objc_retain can serve as a may-use for a different pointer.Dan Gohman2012-07-231-1/+4
| | | | | | rdar://11931823. llvm-svn: 160637
* Fix a typo (the the => the)Sylvestre Ledru2012-07-231-2/+2
| | | | llvm-svn: 160621
* Fix the objc_autoreleasedReturnValue optimization code to locateDan Gohman2012-06-251-2/+17
| | | | | | | the call correctly even in the case where it is an invoke. This fixes rdar://11714057. llvm-svn: 159157
* Fix typos found by http://github.com/lyda/misspell-checkBenjamin Kramer2012-06-021-1/+1
| | | | llvm-svn: 157885
* Reimplement the intrinsic verifier to use the same table as ↵Chris Lattner2012-05-271-1/+1
| | | | | | | | | | | | | 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 llvm-svn: 157545
* Mark an unreachable region of code with llvm_unreachable.Dan Gohman2012-05-211-1/+1
| | | | llvm-svn: 157197
* Fix replacing all the users of objc weak runtime routinesDan Gohman2012-05-181-2/+12
| | | | | | when deleting them. rdar://11434915. llvm-svn: 157080
* Fix the objc_storeStrong recognizer to stop before walking off theDan Gohman2012-05-091-1/+4
| | | | | | end of a basic block if there's no store. llvm-svn: 156520
* Remove unused variable to get rid of warning.Craig Topper2012-05-091-1/+1
| | | | llvm-svn: 156466
* Miscellaneous accumulated cleanups.Dan Gohman2012-05-081-104/+78
| | | | llvm-svn: 156445
* Fix objc_storeStrong pattern matching to catch a potential use of theDan Gohman2012-05-081-9/+29
| | | | | | | old value after the store but before it is released. This fixes rdar:/11116986. llvm-svn: 156442
* Miscellaneous accumulated cleanups.Dan Gohman2012-04-271-71/+57
| | | | llvm-svn: 155725
* Simplify the known retain count tracking; use a boolean state insteadDan Gohman2012-04-251-41/+34
| | | | | | | of a precise count. Also, move RRInfo's Partial field into PtrState, now that it won't increase the size. llvm-svn: 155513
* Build custom predecessor and successor lists for each basic block.Dan Gohman2012-04-241-115/+101
| | | | | | | | These lists exclude invoke unwind edges and loop backedges which are being ignored. This makes it easier to ignore them consistently. llvm-svn: 155500
* Avoid a bug in the path count computation, preventing an infiniteDan Gohman2012-04-191-1/+1
| | | | | | loop repeatedlt making the same change. This is for rdar://11256239. llvm-svn: 155160
* Don't crash on code where the user put __attribute__((constructor)) onDan Gohman2012-04-181-1/+5
| | | | | | a function with arguments. This fixes rdar://11265785. llvm-svn: 155073
* Add some comments, and fix a few places that missed setting Changed.Dan Gohman2012-04-131-2/+24
| | | | llvm-svn: 154687
* Consider ObjC runtime calls objc_storeWeak and others which make a copy ofDan Gohman2012-04-131-14/+29
| | | | | | | their argument as "escape" points for objc_retainBlock optimization. This fixes rdar://11229925. llvm-svn: 154682
* Use the new Use-aware dominates method to apply the objc runtimeDan Gohman2012-04-131-8/+5
| | | | | | | library return value optimization for phi uses. Even when the phi itself is not dominated, the specific use may be dominated. llvm-svn: 154647
* Don't move objc_autorelease calls past autorelease pool boundaries whenDan Gohman2012-04-131-3/+43
| | | | | | | optimizing autorelease calls on phi nodes with null operands. This fixes rdar://11207070. llvm-svn: 154642
* Fix accidentally inverted logic from r152803, and make theDan Gohman2012-04-051-1/+1
| | | | | | testcase slightly less trivial. This fixes rdar://11171718. llvm-svn: 154118
* Fix the MSVC build.Francois Pichet2012-03-241-2/+2
| | | | llvm-svn: 153366
* Don't convert objc_retainAutoreleasedReturnValue to objc_retain if itDan Gohman2012-03-231-2/+11
| | | | | | is retaining the return value of an invoke that it immediately follows. llvm-svn: 153344
* It's not possible to insert code immediately after an invoke in theDan Gohman2012-03-231-32/+42
| | | | | | | | | | | | 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. llvm-svn: 153343
* Refactor the code for visiting instructions out into helper functions.Dan Gohman2012-03-221-245/+271
| | | | llvm-svn: 153267
* Short term fix for pr12270 before we change dominates to handle unreachableRafael Espindola2012-03-151-29/+33
| | | | | | | code. While here, reduce indentation. llvm-svn: 152803
* When an invoke is marked with metadata indicating its unwind edgeDan Gohman2012-03-141-1/+2
| | | | | | | should be ignored by ARC optimization, don't insert new ARC runtime calls in the unwind destination. llvm-svn: 152748
* When identifying exit nodes for the reverse-CFG reverse-post-orderDan Gohman2012-03-091-2/+8
| | | | | | | | | 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. llvm-svn: 152421
* Fix an iterator invalidation problem. operator[] on a DenseMapDan Gohman2012-03-021-8/+28
| | | | | | | can insert a new element, invalidating iterators. Use find instead, and handle the case where the key is not found explicitly. llvm-svn: 151871
* Misc micro-optimizations.Dan Gohman2012-03-021-10/+12
| | | | llvm-svn: 151869
* Calls and invokes with the new clang.arc.no_objc_arc_exceptionsDan Gohman2012-02-171-6/+47
| | | | | | | | metadata may still unwind, but only in ways that the ARC optimizer doesn't need to consider. This permits more aggressive optimization. llvm-svn: 150829
* Just like in regular escape analysis, loads and stores throughDan Gohman2012-02-131-0/+10
| | | | | | | (but not of) a block pointer do not cause the block pointer to escape. This fixes rdar://10803830. llvm-svn: 150424
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-201-2/+0
| | | | llvm-svn: 148578
* Set the "tail" flag on pattern-matched objc_storeStrong calls.Dan Gohman2012-01-191-0/+32
| | | | | | rdar://10531041. llvm-svn: 148490
* Add a depth limit to avoid runaway recursion.Dan Gohman2012-01-181-3/+7
| | | | llvm-svn: 148419
* Use llvm.global_ctors to locate global constructors insteadDan Gohman2012-01-181-6/+19
| | | | | | of recognizing them by name. llvm-svn: 148416
OpenPOWER on IntegriCloud