r348429 - Update ARC docs as objc_storeStrong returns void not id

2018-12-05 Thread Pete Cooper via cfe-commits
Author: pete Date: Wed Dec 5 15:49:52 2018 New Revision: 348429 URL: http://llvm.org/viewvc/llvm-project?rev=348429&view=rev Log: Update ARC docs as objc_storeStrong returns void not id Modified: cfe/trunk/docs/AutomaticReferenceCounting.rst Modified: cfe/trunk/docs/AutomaticReferenceCounti

r348431 - Fix title underlines being too short after r348429

2018-12-05 Thread Pete Cooper via cfe-commits
Author: pete Date: Wed Dec 5 16:01:44 2018 New Revision: 348431 URL: http://llvm.org/viewvc/llvm-project?rev=348431&view=rev Log: Fix title underlines being too short after r348429 Modified: cfe/trunk/docs/AutomaticReferenceCounting.rst Modified: cfe/trunk/docs/AutomaticReferenceCounting.rs

r348687 - Convert some ObjC msgSends to runtime calls.

2018-12-07 Thread Pete Cooper via cfe-commits
Author: pete Date: Fri Dec 7 21:13:50 2018 New Revision: 348687 URL: http://llvm.org/viewvc/llvm-project?rev=348687&view=rev Log: Convert some ObjC msgSends to runtime calls. It is faster to directly call the ObjC runtime for methods such as alloc/allocWithZone instead of sending a message to t

Re: [PATCH] D55802: Change CGObjC to use objc intrinsics instead of runtime methods

2019-02-24 Thread Pete Cooper via cfe-commits
Hey David Thanks for letting me know, and analysing it this far! I also can't see anything wrong with the intrinsic. Its just defined as: def int_objc_autoreleasePoolPop : Intrinsic<[], [llvm_ptr_ty]>; which (I believe) means it has unmodelled side effects so it should have been f

r349782 - Use @llvm.objc.clang.arc.use intrinsic instead of clang.arc.use function.

2018-12-20 Thread Pete Cooper via cfe-commits
Author: pete Date: Thu Dec 20 10:05:41 2018 New Revision: 349782 URL: http://llvm.org/viewvc/llvm-project?rev=349782&view=rev Log: Use @llvm.objc.clang.arc.use intrinsic instead of clang.arc.use function. Calls to this function are deleted in the ARC optimizer. However when the ARC optimizer was

r349952 - Convert some ObjC retain/release msgSends to runtime calls.

2018-12-21 Thread Pete Cooper via cfe-commits
Author: pete Date: Fri Dec 21 13:00:32 2018 New Revision: 349952 URL: http://llvm.org/viewvc/llvm-project?rev=349952&view=rev Log: Convert some ObjC retain/release msgSends to runtime calls. It is faster to directly call the ObjC runtime for methods such as retain/release instead of sending a me

r350224 - Only convert objc messages to alloc to objc_alloc if the receiver is a class.

2019-01-02 Thread Pete Cooper via cfe-commits
Author: pete Date: Wed Jan 2 09:25:30 2019 New Revision: 350224 URL: http://llvm.org/viewvc/llvm-project?rev=350224&view=rev Log: Only convert objc messages to alloc to objc_alloc if the receiver is a class. r348687 converted [Foo alloc] to objc_alloc(Foo). However the objc runtime method only

Re: [PATCH] Change memcpy/memmove/memset to have dest and source alignment

2015-09-28 Thread Pete Cooper via cfe-commits
Hey Hal Thanks for the review. I really appreciate it given the scale of this. > On Sep 25, 2015, at 1:13 PM, Hal Finkel wrote: > > Hi Pete, > > Thanks for working on this. > > + class IntegerAlignment { > + private: > +uint64_t Align; > > You explain in the patch summary why this is he

Re: [clang-tools-extra] r245471 - [clang-tidy] Fix a bug in UseNullptrCheck.

2015-08-19 Thread Pete Cooper via cfe-commits
Hi Alexander We’re still getting a green dragon failure on the null ptr check test. Mind taking a look? http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/10351/consoleFull#50560140149ba4694-19c4-4d7e-bec5-911270d8a58c

Re: [clang-tools-extra] r245471 - [clang-tidy] Fix a bug in UseNullptrCheck.

2015-08-19 Thread Pete Cooper via cfe-commits
Looks like its only a single test thats failing. Would you mind if I remove this piece of the test until we can get to the bottom of it? void test_macro_expansion4() { #define MY_NULL NULL int *p = MY_NULL; // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: use nullptr [modernize-use-nullptr] /

Re: [clang-tools-extra] r245471 - [clang-tidy] Fix a bug in UseNullptrCheck.

2015-08-19 Thread Pete Cooper via cfe-commits
> On Aug 19, 2015, at 2:38 PM, Alexander Kornienko wrote: > > The check has been reverted in r245493. Sorry for the breakage, I was hoping > that this commit fixes it. No problem. Thanks for taking a look. If you think the rest of the code is good and want to land it again then thats fine.

Re: [clang-tools-extra] r245471 - [clang-tidy] Fix a bug in UseNullptrCheck.

2015-08-19 Thread Pete Cooper via cfe-commits
Yep, works for me locally. Thanks for fixing it. Pete > On Aug 19, 2015, at 3:24 PM, Alexander Kornienko wrote: > > I've committed the check with minor modifications and without the offending > test in r245511. Could you verify that it works in your setup? > > -- Alex > > On Wed, Aug 19, 201

Re: [PATCH] Change memcpy/memmove/memset to have dest and source alignment

2015-11-11 Thread Pete Cooper via cfe-commits
> On Nov 11, 2015, at 11:16 AM, Hal Finkel wrote: > > It seems like I dropped the ball on this. Yes, I recall being fine with them > otherwise. Thanks Hal! I’ll rebase the patches and land them over the next day or two. Thanks, Pete > > Thanks again, > Hal __

Re: [PATCH] D16821: Add whole-program vtable optimization feature to Clang.

2016-02-05 Thread Pete Cooper via cfe-commits
pete added a comment. Sorry I haven't got to this sooner. I'll try review what I can over the next day or two. Saying that, i'm not experienced enough in the clang codebase to give a LGTM. I can comment on style, but someone else will need to give the final ok. http://reviews.llvm.org/D1682

Re: [PATCH] D16821: Add whole-program vtable optimization feature to Clang.

2016-02-22 Thread Pete Cooper via cfe-commits
> On Feb 22, 2016, at 1:30 PM, Peter Collingbourne wrote: > > One thing that I'd like to do (and this would help CFI as well) is to > specifically recognize cases like this: > > ``` > struct B { > virtual void vf(); > }; > > struct D1 { > }; I assume you meant D1 : B here? > > struct D2 : B

Re: r268055 - Recommitted r264281 "Supporting all entities declared in lexical scope in LLVM debug info."

2016-04-29 Thread Pete Cooper via cfe-commits
Hi Amjad Either this change, or r268054, appears to have broken the bots. Can you please take a look? The error at: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/22409/consoleFull#8333002949ba4694-19c4-4d7e-bec5-911270d8a58c

Re: r268055 - Recommitted r264281 "Supporting all entities declared in lexical scope in LLVM debug info."

2016-04-29 Thread Pete Cooper via cfe-commits
> On Apr 29, 2016, at 10:27 AM, Aboud, Amjad wrote: > > Sorry for that, I broke a LIT test that I added few days ago. > The LIT test need to be fixed and I already fixed it in r268063. No problem. Thanks for the quick reply. > > Let’s wait till r268063 run bots and see that everything will pa

r268416 - Change test to use regex instead of explicit value numbers. NFC.

2016-05-03 Thread Pete Cooper via cfe-commits
Author: pete Date: Tue May 3 13:32:01 2016 New Revision: 268416 URL: http://llvm.org/viewvc/llvm-project?rev=268416&view=rev Log: Change test to use regex instead of explicit value numbers. NFC. We were seeing an internal failure when running this test. I can't see a good reason for the differ

Re: r268385 - [Clang][avx512][Builtin] Adding intrinsics for cvtw2mask{128|256|512} instruction set

2016-05-03 Thread Pete Cooper via cfe-commits
Hi Michael I was seeing issues with the CHECK lines referencing explicit value numbers. i.e., %1, %2, etc. In r268416 I changed these to use a regex. I hope this was ok. Please let me know if you have an alternative you would prefer. Thanks, Pete > On May 3, 2016, at 7:12 AM, Michael Zucker

r268523 - Update test CHECK lines after r268509. NFC.

2016-05-04 Thread Pete Cooper via cfe-commits
Author: pete Date: Wed May 4 12:37:27 2016 New Revision: 268523 URL: http://llvm.org/viewvc/llvm-project?rev=268523&view=rev Log: Update test CHECK lines after r268509. NFC. r268509 causes this test case to be fully unrolled, so checking for an icmp is no longer valid. Given that this test is

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 sho

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-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, wi

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 _

r263607 - Convert some ObjC msgSends to runtime calls.

2016-03-15 Thread Pete Cooper via cfe-commits
Author: pete Date: Tue Mar 15 19:33:21 2016 New Revision: 263607 URL: http://llvm.org/viewvc/llvm-project?rev=263607&view=rev Log: Convert some ObjC msgSends to runtime calls. It is faster to directly call the ObjC runtime for methods such as retain/release instead of sending a message to those

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&id=50785#toc Repository: rL LLVM http://reviews.llvm.org/D14

r263984 - Revert "Convert some ObjC msgSends to runtime calls."

2016-03-21 Thread Pete Cooper via cfe-commits
Author: pete Date: Mon Mar 21 15:50:03 2016 New Revision: 263984 URL: http://llvm.org/viewvc/llvm-project?rev=263984&view=rev Log: Revert "Convert some ObjC msgSends to runtime calls." This reverts commit r263607. This change caused more objc_retain/objc_release calls in the IR but those are the

[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 retain/release

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

2015-11-17 Thread Pete Cooper via cfe-commits
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/

r253519 - Fix debian build after r253512.

2015-11-18 Thread Pete Cooper via cfe-commits
Author: pete Date: Wed Nov 18 16:53:40 2015 New Revision: 253519 URL: http://llvm.org/viewvc/llvm-project?rev=253519&view=rev Log: Fix debian build after r253512. The conversion from QuantityType to the (temporary) IntegerAlignment class was ambiguous. For now add in explicit conversion to unsig

Re: [PATCH] Change memcpy/memmove/memset to have dest and source alignment

2015-11-18 Thread Pete Cooper via cfe-commits
Pushed this in LLVM r253511 and clang 253512. Thanks again for the review Hal. BTW, I realized the docs need to be updated. I’ll let the bots run on this for a while and if it all goes well I’ll commit the docs update. Cheers, Pete > On Nov 11, 2015, at 11:25 AM, Pete Cooper via cfe-comm

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 getVersion() >= VersionTu

r253541 - Revert "Fix debian build after r253512."

2015-11-18 Thread Pete Cooper via cfe-commits
Author: pete Date: Wed Nov 18 23:55:44 2015 New Revision: 253541 URL: http://llvm.org/viewvc/llvm-project?rev=253541&view=rev Log: Revert "Fix debian build after r253512." This reverts commit r253519. This likely broke the bots in http://lab.llvm.org:8011/builders/clang-ppc64-elf-linux2/builds/2

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

2015-11-19 Thread Pete Cooper via cfe-commits
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

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

2015-11-19 Thread Pete Cooper via cfe-commits
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

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

2015-11-19 Thread Pete Cooper via cfe-commits
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

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 de