[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-22 Thread David Chisnall via cfe-commits
https://github.com/davidchisnall closed https://github.com/llvm/llvm-project/pull/78030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-21 Thread Saleem Abdulrasool via cfe-commits
@@ -463,7 +471,8 @@ class ObjCRuntime { case iOS: return true; case WatchOS: return true; case GCC: return false; -case GNUstep: return false; +case GNUstep: + return (getVersion() >= VersionTuple(2, 2)); compnerd wrote: The parenthesi

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-21 Thread Saleem Abdulrasool via cfe-commits
@@ -2649,13 +2767,18 @@ CGObjCGNU::GenerateMessageSend(CodeGenFunction &CGF, } } + bool isDirect = Method && Method->isDirectMethod(); + IdTy = cast(CGM.getTypes().ConvertType(ASTIdTy)); llvm::Value *cmd; - if (Method) -cmd = GetSelector(CGF, Method); - else

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-21 Thread Saleem Abdulrasool via cfe-commits
@@ -2006,6 +2024,106 @@ class CGObjCGNUstep2 : public CGObjCGNUstep { { PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty }); } +void GenerateDirectMethodPrologue(CodeGenFunction &CGF, llvm::Function *Fn, +

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-21 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd edited https://github.com/llvm/llvm-project/pull/78030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-21 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. Left some minor nits. https://github.com/llvm/llvm-project/pull/78030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-21 Thread David Chisnall via cfe-commits
https://github.com/davidchisnall updated https://github.com/llvm/llvm-project/pull/78030 >From 008814b0aeee4b1a853fa4544c0dba89252425ce Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Sun, 7 Jan 2024 14:53:48 + Subject: [PATCH] Enable direct methods and fast alloc calls for libobjc2. T

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-21 Thread David Chisnall via cfe-commits
davidchisnall wrote: Thanks, all review comments should now be resolved. https://github.com/llvm/llvm-project/pull/78030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-21 Thread David Chisnall via cfe-commits
https://github.com/davidchisnall updated https://github.com/llvm/llvm-project/pull/78030 >From 02123c6557c7deea3f04f96bce7230f9d45e4ddb Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Sun, 7 Jan 2024 14:53:48 + Subject: [PATCH] Enable direct methods and fast alloc calls for libobjc2. T

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-14 Thread Saleem Abdulrasool via cfe-commits
@@ -1994,6 +2004,106 @@ class CGObjCGNUstep2 : public CGObjCGNUstep { { PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty }); } +void GenerateDirectMethodPrologue(CodeGenFunction &CGF, llvm::Function *Fn, +

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-14 Thread Saleem Abdulrasool via cfe-commits
@@ -3906,14 +4028,50 @@ llvm::Function *CGObjCGNU::GenerateMethod(const ObjCMethodDecl *OMD, CodeGenTypes &Types = CGM.getTypes(); llvm::FunctionType *MethodTy = Types.GetFunctionType(Types.arrangeObjCMethodDeclaration(OMD)); - std::string FunctionName = getSymbolName

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-14 Thread Saleem Abdulrasool via cfe-commits
@@ -1994,6 +2004,106 @@ class CGObjCGNUstep2 : public CGObjCGNUstep { { PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty }); } +void GenerateDirectMethodPrologue(CodeGenFunction &CGF, llvm::Function *Fn, +

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-14 Thread Saleem Abdulrasool via cfe-commits
@@ -1994,6 +2004,106 @@ class CGObjCGNUstep2 : public CGObjCGNUstep { { PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty }); } +void GenerateDirectMethodPrologue(CodeGenFunction &CGF, llvm::Function *Fn, +

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-14 Thread David Chisnall via cfe-commits
davidchisnall wrote: Formatting issues were introduced by running clang-format15, should now be fixed. https://github.com/llvm/llvm-project/pull/78030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-14 Thread David Chisnall via cfe-commits
https://github.com/davidchisnall updated https://github.com/llvm/llvm-project/pull/78030 >From c8d733479ee8d0fd7c75c4a623f8c1bc2f132c61 Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Sun, 7 Jan 2024 14:53:48 + Subject: [PATCH] Enable direct methods and fast alloc calls for libobjc2. T

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-13 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 8f76f1816ea63b7cc28e150ba319ffbfe6351f9e b286b9b07d60a7b3243ad5e8e6959a4d7d7fda49 --

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: David Chisnall (davidchisnall) Changes These will be supported in the upcoming 2.2 release and so are gated on that version. Direct methods call `objc_send_initialize` if they are class methods that may not have called initialize. This

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-13 Thread David Chisnall via cfe-commits
https://github.com/davidchisnall created https://github.com/llvm/llvm-project/pull/78030 These will be supported in the upcoming 2.2 release and so are gated on that version. Direct methods call `objc_send_initialize` if they are class methods that may not have called initialize. This is gua