1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/test/Transforms
Michael Gottesman 81c7cd8b47 [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.

llvm-svn: 189869
2013-09-03 22:40:54 +00:00
..
ADCE [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
ArgumentPromotion [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
BBVectorize TBAA: remove !tbaa from testing cases when they are not needed. 2013-08-21 22:20:53 +00:00
BlockPlacement [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
BranchFolding
CodeExtractor [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
CodeGenPrepare [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
ConstantMerge [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
ConstProp Teach ConstantFolding about pointer address spaces 2013-08-20 21:20:04 +00:00
CorrelatedValuePropagation [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
DeadArgElim Debug Info: add an identifier field to DICompositeType. 2013-08-26 22:39:55 +00:00
DeadStoreElimination [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
DebugIR [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
EarlyCSE [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
FunctionAttrs [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
GCOVProfiling [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
GlobalDCE [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
GlobalOpt Debug Info: add an identifier field to DICompositeType. 2013-08-26 22:39:55 +00:00
GVN [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
IndVarSimplify [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
Inline Handle address spaces in TargetTransformInfo 2013-08-28 22:41:57 +00:00
InstCombine Teach InstCombineLoadCast about address spaces. 2013-09-03 21:05:48 +00:00
InstSimplify [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
Internalize [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
IPConstantProp [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
JumpThreading [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
LCSSA [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
LICM Debug Info: add an identifier field to DICompositeType. 2013-08-26 22:39:55 +00:00
LoopDeletion [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
LoopIdiom Debug Info: add an identifier field to DICompositeType. 2013-08-26 22:39:55 +00:00
LoopRotate Debug Info: add an identifier field to DICompositeType. 2013-08-26 22:39:55 +00:00
LoopSimplify [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
LoopStrengthReduce [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
LoopUnroll [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
LoopUnswitch [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
LoopVectorize Disable unrolling in the loop vectorizer when disabled in the pass manager 2013-08-28 18:33:10 +00:00
LowerAtomic [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
LowerExpectIntrinsic [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
LowerInvoke [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
LowerSwitch [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
Mem2Reg Debug Info: add an identifier field to DICompositeType. 2013-08-26 22:39:55 +00:00
MemCpyOpt [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
MergeFunc [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
MetaRenamer [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
ObjCARC [objc-arc] Turn off the objc_retainBlock -> objc_retain optimization. 2013-09-03 22:40:54 +00:00
PhaseOrdering [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
PruneEH [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
Reassociate [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
Reg2Mem [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
ScalarRepl Debug Info: add an identifier field to DICompositeType. 2013-08-26 22:39:55 +00:00
SCCP [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
SimplifyCFG Debug Info: add an identifier field to DICompositeType. 2013-08-26 22:39:55 +00:00
Sink [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
SLPVectorizer/X86 In this patch we are trying to do two things: 2013-09-03 17:26:04 +00:00
SROA [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
StripSymbols Fix a test to not fail for users with my name. :) 2013-08-29 00:41:22 +00:00
StructurizeCFG [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
TailCallElim [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
TailDup [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00