Re: [PATCH] D14737: Convert some ObjC msgSends to runtime calls

2016-03-15 Thread Pete Cooper via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL263607: Convert some ObjC msgSends to runtime calls. (authored by pete). Changed prior to commit: http://reviews.llvm.org/D14737?vs=50651=50785#toc Repository: rL LLVM

Re: [PATCH] D14737: Convert some ObjC msgSends to runtime calls

2016-03-15 Thread John McCall via cfe-commits
rjmccall added a comment. Yes, LGTM. http://reviews.llvm.org/D14737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14737: Convert some ObjC msgSends to runtime calls

2016-03-15 Thread Pete Cooper via cfe-commits
pete added a comment. In http://reviews.llvm.org/D14737#375739, @rjmccall wrote: > Ah, okay, if you changed it to cast explicitly, that's all I was concerned > about. Cool. Thanks. Any other concerns or does this look good to you? http://reviews.llvm.org/D14737

Re: [PATCH] D14737: Convert some ObjC msgSends to runtime calls

2016-03-15 Thread John McCall via cfe-commits
rjmccall added a comment. Ah, okay, if you changed it to cast explicitly, that's all I was concerned about. http://reviews.llvm.org/D14737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D14737: Convert some ObjC msgSends to runtime calls

2016-03-15 Thread Pete Cooper via cfe-commits
pete added a comment. In http://reviews.llvm.org/D14737#375735, @rjmccall wrote: > Can you find where that bitcast is being added? I know that different parts > of IRGen are differently sensitive to types — it's possible that the return > code is one of those more-permissive places. Sure,

Re: [PATCH] D14737: Convert some ObjC msgSends to runtime calls

2016-03-15 Thread John McCall via cfe-commits
rjmccall added a comment. Can you find where that bitcast is being added? I know that different parts of IRGen are differently sensitive to types — it's possible that the return code is one of those more-permissive places. http://reviews.llvm.org/D14737

Re: [PATCH] D14737: Convert some ObjC msgSends to runtime calls

2016-03-14 Thread Pete Cooper via cfe-commits
pete updated this revision to Diff 50651. pete added a comment. Thanks for the example John. I understand what you mean now. I've added this piece to the test case which verifies that the following IR has the correct bit cast in it. Similarly added cases for alloc and autorelease. @class A;

Re: [PATCH] D14737: Convert some ObjC msgSends to runtime calls

2016-03-13 Thread John McCall via cfe-commits
rjmccall added a comment. In http://reviews.llvm.org/D14737#373532, @pete wrote: > I stepped through this one in the debugger to make sure I had it right. > > So the reason the bit cast ends up not being needed is because we restricted > this optimization to cases where the result type

Re: [PATCH] D14737: Convert some ObjC msgSends to runtime calls

2016-03-11 Thread Pete Cooper via cfe-commits
pete added a comment. Hi John Sorry, getting back to this after way too long! In http://reviews.llvm.org/D14737#294218, @rjmccall wrote: > In http://reviews.llvm.org/D14737#293967, @pete wrote: > > > Added a couple of tests for retain returning types other than id. > > Returning a pointer

Re: [PATCH] D14737: Convert some ObjC msgSends to runtime calls

2015-11-20 Thread Pete Cooper via cfe-commits
pete updated this revision to Diff 40790. pete added a comment. Added a couple of tests for retain returning types other than id. Returning a pointer should still be converted to a call, while returning a non-pointer such as float will get a message instead. I walked through the code in the

Re: [PATCH] D14737: Convert some ObjC msgSends to runtime calls

2015-11-20 Thread John McCall via cfe-commits
rjmccall added a comment. In http://reviews.llvm.org/D14737#293967, @pete wrote: > Added a couple of tests for retain returning types other than id. Returning > a pointer should still be converted to a call, while returning a non-pointer > such as float will get a message instead. > > I

Re: [PATCH] D14737: Convert some ObjC msgSends to runtime calls

2015-11-19 Thread John McCall via cfe-commits
rjmccall added a comment. The casts done by emitARCValueOperation will handle the input, but they don't quite handle the result properly. The right test case here is a method named "retain" that's declared to return something completely unrelated to its receiver type, e.g. @class A;

Re: [PATCH] D14737: Convert some ObjC msgSends to runtime calls

2015-11-18 Thread Pete Cooper via cfe-commits
> On Nov 18, 2015, at 4:21 PM, John McCall wrote: > > rjmccall added inline comments. > > > Comment at: include/clang/Basic/ObjCRuntime.h:182 > @@ +181,3 @@ > +switch (getKind()) { > +case FragileMacOSX: return false; > +case MacOSX: return

Re: [PATCH] D14737: Convert some ObjC msgSends to runtime calls

2015-11-18 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: include/clang/Basic/ObjCRuntime.h:182 @@ +181,3 @@ +switch (getKind()) { +case FragileMacOSX: return false; +case MacOSX: return getVersion() >= VersionTuple(10, 10); I went ahead and asked Greg, and he

Re: [PATCH] D14737: Convert some ObjC msgSends to runtime calls

2015-11-17 Thread Stephane Moore via cfe-commits
stephanemoore added a subscriber: stephanemoore. stephanemoore added a comment. I hope that it's not presumptuous of me to inquire but I was wondering if the intent of this patch is to optimize calls to RR methods (and alloc) in non-ARC code? Would I be correct in assuming that clang will

[PATCH] D14737: Convert some ObjC msgSends to runtime calls

2015-11-16 Thread Pete Cooper via cfe-commits
pete created this revision. pete added a reviewer: rjmccall. pete added a subscriber: cfe-commits. It is faster to directly call the ObjC runtime for methods such as retain/release instead of sending a message to those functions. This patch adds support for converting messages to