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&id=50785#toc
Repository:
rL LLVM
http://reviews.llvm.org/D14
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
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
_
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
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co
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, wi
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
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;
@
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 "isObjCOb
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 sho
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 walked
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 de
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;
@inte
pete updated this revision to Diff 40719.
pete added a comment.
Thanks for all the feedback!
I've addressed all of your previous feedback and also applied clang-format to
the whole patch as some parts were looking questionable.
BTW, each of the implementations of EmitObjC* ultimately called to
rjmccall added a comment.
By "in CGObjC", I mean you should be able to do it in
CodeGenFunction::EmitObjCMessageExpr. Maybe put it in a separate function like
static llvm::Value *tryGenerateSpecializedMessageSend(...)
and then do something like
} else if (llvm::Value *SpecializedResult =
pete updated this revision to Diff 40705.
pete added a comment.
After chatting with John offline, he mentioned that this code could be shared
with all ObjC CG's if I put it in EmitObjCMessageExpr.
This moves it here and also checks that we don't do the retain/release
call->msgSend optimization
pete updated this revision to Diff 40703.
pete added a comment.
Updated with the following changes:
- Removed the -f-objc-X option and made the -fno-objc-X option be codegen only.
- Updated all the comments to be what John suggested.
- Added a method (shouldUseRuntimeFunctionsForAlloc) to single
> 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 getVersion() >= VersionTu
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 agree
rjmccall added a comment.
In http://reviews.llvm.org/D14737#291481, @stephanemoore wrote:
> 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
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 alread
rjmccall added inline comments.
Comment at: include/clang/Basic/LangOptions.def:194
@@ -193,2 +193,3 @@
LANGOPT(ObjCAutoRefCount , 1, 0, "Objective-C automated reference counting")
+LANGOPT(ObjCConvertMessagesToRuntimeCalls , 1, 0, "objc_* support for
retain/release in t
pete updated this revision to Diff 40426.
pete added a comment.
Updated the driver test to ensure that the option is set for tvOS and watchOS.
http://reviews.llvm.org/D14737
Files:
include/clang/Basic/LangOptions.def
include/clang/Basic/ObjCRuntime.h
include/clang/Driver/Options.td
lib/
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
retain/release
23 matches
Mail list logo