<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">r185782.<div><br><div><div>On Jul 7, 2013, at 9:45 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><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:<span class="Apple-converted-space"> </span><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:<span class="Apple-converted-space"> </span><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:<span class="Apple-converted-space"> </span><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>><span class="Apple-converted-space"> </span><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>><span class="Apple-converted-space"> </span><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a></p></div></blockquote></div><br></div></body></html>