| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
for refactoring the ARC Optimizer.
llvm-svn: 173647
|
|
|
|
|
|
|
|
|
| |
This name change does the following:
1. Causes the function name to use proper ARC terminology.
2. Makes it clear what the function truly does.
llvm-svn: 173609
|
|
|
|
|
|
| |
in 'Provenance Analysis'.
llvm-svn: 173374
|
|
|
|
| |
llvm-svn: 173202
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
into the method ConnectTDBUTraversals.
The method PerformCodePlacement was doing too much (i.e. 3x loops, lots of
different checking). This refactoring separates the analysis section of the
method into a separate function while leaving the actual code placement and
analysis preparation in PerformCodePlacement.
*NOTE* Really this part of ObjCARC should be refactored out of the main pass
class into its own seperate class/struct. But, it is not time to make that
change yet though (don't want to make such an invasive change without fixing all
of the bugs first).
llvm-svn: 173201
|
|
|
|
|
|
|
| |
Use the AttributeSet when we're talking about more than one attribute. Add a
function that adds a single attribute. No functionality change intended.
llvm-svn: 173196
|
|
|
|
| |
llvm-svn: 172864
|
|
|
|
| |
llvm-svn: 172863
|
|
|
|
| |
llvm-svn: 172839
|
|
|
|
| |
llvm-svn: 172782
|
|
|
|
| |
llvm-svn: 172736
|
|
|
|
|
|
| |
``Visited'' Debug message to use it.
llvm-svn: 172735
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-fno-objc-arc-exception is enabled due to it's affect on correctness.
Specifically according to the semantics of ARC -fno-objc-arc-exception simply
states that it is expected that the unwind path out of a call *MAY* not release
objects. Thus we can have the situation where a release gets moved into a catch
block which we ignore when we remove a retain/release pair resulting in (even
though we assume the program is exiting anyways) the cleanup code path
potentially blowing up before program exit.
llvm-svn: 172599
|
|
|
|
| |
llvm-svn: 172452
|
|
|
|
| |
llvm-svn: 172374
|
|
|
|
|
|
| |
use doxygen). Still some work to do though.
llvm-svn: 172371
|
|
|
|
|
|
|
|
| |
2x blocks each assigned a value via a phi-node causing each to depend on the other.
A test case is provided as well.
llvm-svn: 172368
|
|
|
|
| |
llvm-svn: 172347
|
|
|
|
| |
llvm-svn: 172346
|
|
|
|
| |
llvm-svn: 172299
|
|
|
|
| |
llvm-svn: 172298
|
|
|
|
|
|
| |
=> objc_autorelease but were not updating the InstructionClass to IC_Autorelease.
llvm-svn: 172288
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
not be placed into an autorelease pool.
The reason that this occurs is that tail calling objc_autorelease eventually
tail calls -[NSObject autorelease] which supports fast autorelease. This can
cause us to violate the semantic gaurantees of __autoreleasing variables that
assignment to an __autoreleasing variables always yields an object that is
placed into the innermost autorelease pool.
The fix included in this patch works by:
1. In the peephole optimization function OptimizeIndividualFunctions, always
remove tail call from objc_autorelease.
2. Whenever we convert to/from an objc_autorelease, set/unset the tail call
keyword as appropriate.
*NOTE* I also handled the case where objc_autorelease is converted in
OptimizeReturns to an autoreleaseRV which still violates the ARC semantics. I
will be removing that in a later patch and I wanted to make sure that the tree
is in a consistent state vis-a-vis ARC always.
Additionally some test cases are provided and all tests that have tail call marked
objc_autorelease keywords have been modified so that tail call has been removed.
*NOTE* One test fails due to a separate bug that I am going to commit soon. Thus
I marked the check line TMP: instead of CHECK: so make check does not fail.
llvm-svn: 172287
|
|
|
|
|
|
| |
into an autoreleaseRV.
llvm-svn: 172034
|
|
|
|
|
|
|
|
|
|
| |
commits ala echristo's suggestion.
1. Added debug messages when in OptimizeIndividualCalls we move calls into predecessors and then erase the original call.
2. Added debug messages when in the process of moving calls in ObjCARCOpt::MoveCalls we create new RR and delete old RR.
3. Added a debug message when we visit a specific retain instruction in ObjCARCOpt::PerformCodePlacement.
llvm-svn: 171988
|
|
|
|
| |
llvm-svn: 171791
|
|
|
|
|
|
| |
pair in ObjCARCContract::ContractAutorelease.
llvm-svn: 171679
|
|
|
|
|
|
| |
retain/autorelease pair in ObjCARCOpt::OptimizeReturns.
llvm-svn: 171678
|
|
|
|
|
|
| |
null since they are no-ops.
llvm-svn: 171677
|
|
|
|
|
|
| |
to a function which can not throw.
llvm-svn: 171676
|
|
|
|
|
|
| |
a function which can never be passed stack args.
llvm-svn: 171675
|
|
|
|
| |
llvm-svn: 171674
|
|
|
|
|
|
| |
objc_release(x) when x is otherwise unused.
llvm-svn: 171673
|
|
|
|
|
|
|
|
| |
undefined pointer-to-weak-pointer is NULL cases by replacing the given call inst with an undefined value.
The reason that there are two cases is that the first case handles the unary cases and the second the binary cases.
llvm-svn: 171672
|
|
|
|
|
|
| |
special semantic meaning in the frontend and thus in the optimizer can be deleted.
llvm-svn: 171670
|
|
|
|
|
|
| |
objc_autoreleaseReturnValue => objc_autorelease due to its operand not being used as a return value.
llvm-svn: 171669
|
|
|
|
|
|
| |
objc_retainAutorelasedReturnValue => objc_retain since the operand to said function is not a return value.
llvm-svn: 171629
|
|
|
|
|
|
| |
objc_autoreleaseReturnValue/objc_retainAutoreleasedValue pair.
llvm-svn: 171628
|
|
|
|
|
|
| |
objc_retainAutorelasedReturnValue.
llvm-svn: 171535
|
|
|
|
|
|
|
|
| |
the method where it was being called when I should have just prefixed the actual message with Pass::Method.
Additionally I fixed some whitespace issues.
llvm-svn: 171534
|
|
|
|
|
|
| |
processed when said queue was really a list to state a list had finished being processed.
llvm-svn: 171465
|
|
|
|
|
|
| |
ObjCARCAPElim::OptimizeBB.
llvm-svn: 171464
|
|
|
|
|
|
| |
*p = null.
llvm-svn: 171463
|
|
|
|
|
|
| |
architectures where this is required to perform a retainAutoreleasedReturnValue optimization.
llvm-svn: 171462
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
into their new header subdirectory: include/llvm/IR. This matches the
directory structure of lib, and begins to correct a long standing point
of file layout clutter in LLVM.
There are still more header files to move here, but I wanted to handle
them in separate commits to make tracking what files make sense at each
layer easier.
The only really questionable files here are the target intrinsic
tablegen files. But that's a battle I'd rather not fight today.
I've updated both CMake and Makefile build systems (I think, and my
tests think, but I may have missed something).
I've also re-sorted the includes throughout the project. I'll be
committing updates to Clang, DragonEgg, and Polly momentarily.
llvm-svn: 171366
|
|
|
|
|
|
|
|
|
|
| |
utils/sort_includes.py script.
Most of these are updating the new R600 target and fixing up a few
regressions that have creeped in since the last time I sorted the
includes.
llvm-svn: 171362
|
|
|
|
|
|
|
|
|
|
|
| |
verbatim with its argument to temporarily undo an optimization.
Specifically these calls return their argument verbatim, as a low-level
optimization. However, this makes high-level optimizations
harder. We undo any uses of this optimization that the front-end
emitted. We redo them later in the contract pass.
llvm-svn: 171346
|
|
|
|
|
|
|
|
|
| |
that emit what instructions are being visited.
This is a part of a larger effort of adding DEBUG messages to the ARC
Optimizer Backend.
llvm-svn: 171345
|
|
|
|
|
|
| |
single attribute in the future.
llvm-svn: 170502
|
|
|
|
|
|
| |
in the near future.
llvm-svn: 169651
|