<p dir="ltr"><br>
On Jul 6, 2013 9:21 PM, "Michael Gottesman" <<a href="mailto:mgottesman@apple.com">mgottesman@apple.com</a>> wrote:<br>
><br>
> Author: mgottesman<br>
> Date: Sat Jul  6 23:18:03 2013<br>
> New Revision: 185770<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=185770&view=rev">http://llvm.org/viewvc/llvm-project?rev=185770&view=rev</a><br>
> Log:<br>
> [objc-arc] Remove the alias analysis part of r185764.<br>
><br>
> Upon further reflection, the alias analysis part of r185764 is not a safe<br>
> change.</p>
<p dir="ltr">Got a test case you could add so no one makes this mistake again?</p>
<p dir="ltr">><br>
> Modified:<br>
>     llvm/trunk/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.cpp<br>
>     llvm/trunk/test/Transforms/ObjCARC/gvn.ll<br>
><br>
> Modified: llvm/trunk/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.cpp?rev=185770&r1=185769&r2=185770&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.cpp?rev=185770&r1=185769&r2=185770&view=diff</a><br>

> ==============================================================================<br>
> --- llvm/trunk/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.cpp (original)<br>
> +++ llvm/trunk/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.cpp Sat Jul  6 23:18:03 2013<br>
> @@ -150,14 +150,6 @@ ObjCARCAliasAnalysis::getModRefInfo(Immu<br>
>      break;<br>
>    }<br>
><br>
> -  // Handle special objective c calls defaulting to chaining.<br>
> -  const Function *F = CS.getCalledFunction();<br>
> -  if (F)<br>
> -    return StringSwitch<AliasAnalysis::ModRefResult>(F->getName())<br>
> -      .Case("objc_sync_start", NoModRef)<br>
> -      .Case("objc_sync_stop", NoModRef)<br>
> -      .Default(AliasAnalysis::getModRefInfo(CS, Loc));<br>
> -<br>
>    return AliasAnalysis::getModRefInfo(CS, Loc);<br>
>  }<br>
><br>
><br>
> Modified: llvm/trunk/test/Transforms/ObjCARC/gvn.ll<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/gvn.ll?rev=185770&r1=185769&r2=185770&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/gvn.ll?rev=185770&r1=185769&r2=185770&view=diff</a><br>

> ==============================================================================<br>
> --- llvm/trunk/test/Transforms/ObjCARC/gvn.ll (original)<br>
> +++ llvm/trunk/test/Transforms/ObjCARC/gvn.ll Sat Jul  6 23:18:03 2013<br>
> @@ -3,8 +3,6 @@<br>
>  @x = common global i8* null, align 8<br>
><br>
>  declare i8* @objc_retain(i8*)<br>
> -declare i32 @objc_sync_start(i8*)<br>
> -declare i32 @objc_sync_stop(i8*)<br>
><br>
>  ; GVN should be able to eliminate this redundant load, with ARC-specific<br>
>  ; alias analysis.<br>
> @@ -22,19 +20,3 @@ entry:<br>
>    %t = load i8** @x<br>
>    ret i8* %t<br>
>  }<br>
> -<br>
> -; CHECK: define i8* @test1(i32 %n)<br>
> -; CHECK-NEXT: entry:<br>
> -; CHECK-NEXT: %s = load i8** @x<br>
> -; CHECK-NEXT: call i32 @objc_sync_start<br>
> -; CHECK-NEXT: call i32 @objc_sync_stop<br>
> -; CHECK-NEXT: ret i8* %s<br>
> -; CHECK-NEXT: }<br>
> -define i8* @test1(i32 %n) nounwind {<br>
> -entry:<br>
> -  %s = load i8** @x<br>
> -  %0 = call i32 @objc_sync_start(i8* %s)<br>
> -  %t = load i8** @x<br>
> -  %1 = call i32 @objc_sync_stop(i8* %s)<br>
> -  ret i8* %t<br>
> -}<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</p>