Page MenuHomePhabricator

pete (Pete Cooper)
User

Projects

User does not belong to any projects.

User Details

User Since
Jun 2 2014, 4:46 PM (242 w, 2 d)

Recent Activity

Yesterday

pete accepted D56978: Limit dyld image suffixes guessed by guessLibraryShortName().

LGTM

Tue, Jan 22, 9:51 AM

Wed, Jan 2

pete committed rL350284: Teach ObjCARC optimizer about equivalent PHIs when eliminating….
Teach ObjCARC optimizer about equivalent PHIs when eliminating…
Wed, Jan 2, 5:43 PM
pete closed D56235: Teach ObjCARC optimizer about equivalent PHIs when eliminating autoreleaseRV/retainRV pairs.
Wed, Jan 2, 5:42 PM
pete added a comment to D56235: Teach ObjCARC optimizer about equivalent PHIs when eliminating autoreleaseRV/retainRV pairs.

Thanks for the review. Submitted as r350284.

Wed, Jan 2, 5:42 PM
pete created D56235: Teach ObjCARC optimizer about equivalent PHIs when eliminating autoreleaseRV/retainRV pairs.
Wed, Jan 2, 4:54 PM
pete committed rL350261: Fix assert in ObjCARC optimizer when deleting retainBlock of null or undef..
Fix assert in ObjCARC optimizer when deleting retainBlock of null or undef.
Wed, Jan 2, 1:03 PM
pete committed rC350224: Only convert objc messages to alloc to objc_alloc if the receiver is a class..
Only convert objc messages to alloc to objc_alloc if the receiver is a class.
Wed, Jan 2, 9:29 AM
pete committed rL350224: Only convert objc messages to alloc to objc_alloc if the receiver is a class..
Only convert objc messages to alloc to objc_alloc if the receiver is a class.
Wed, Jan 2, 9:29 AM

Dec 21 2018

pete added a comment to D55869: Convert some ObjC retain/release msgSends to runtime calls.

It sounds like it's fine.

Dec 21 2018, 1:04 PM
pete committed rL349952: Convert some ObjC retain/release msgSends to runtime calls..
Convert some ObjC retain/release msgSends to runtime calls.
Dec 21 2018, 1:04 PM
pete committed rC349952: Convert some ObjC retain/release msgSends to runtime calls..
Convert some ObjC retain/release msgSends to runtime calls.
Dec 21 2018, 1:04 PM
pete closed D55869: Convert some ObjC retain/release msgSends to runtime calls.
Dec 21 2018, 1:03 PM
pete added a comment to D55869: Convert some ObjC retain/release msgSends to runtime calls.

Thanks for all the feedback so far. Is there anything else you'd like me to change before I can land this?

Dec 21 2018, 9:09 AM

Dec 20 2018

pete committed rC349782: Use @llvm.objc.clang.arc.use intrinsic instead of clang.arc.use function..
Use @llvm.objc.clang.arc.use intrinsic instead of clang.arc.use function.
Dec 20 2018, 10:10 AM
pete committed rL349782: Use @llvm.objc.clang.arc.use intrinsic instead of clang.arc.use function..
Use @llvm.objc.clang.arc.use intrinsic instead of clang.arc.use function.
Dec 20 2018, 10:10 AM
pete added a comment to D55869: Convert some ObjC retain/release msgSends to runtime calls.
In D55869#1337723, @js wrote:
In D55869#1337706, @js wrote:

The ObjFW runtime itself does not contain anything about release, retain or autorelease - these are all part of ObjFW (as in the framework). As ObjFW also supports the Apple runtime, as well as mixing with Foundation code, it so far only provides objc_retain and objc_release when they are missing, to make ARC work. They just call into the corresponding methods on the object and do nothing else.

How will this change work from the Apple runtime? Will objc_retain/objc_release call the retain/release on the object if it implements its own? Should I drop my own retain/release implementation from my root object if I am compiling against the Apple runtime?

Yes, the idea is that the specialized runtime functions are fast paths for the common case, but they still fall back if the object has overridden them.

I am guessing not just overridden, but also a root class providing one? IOW, the fast path is used when the class does not have the retain or release method at all? In that case, LGTM as is.

Dec 20 2018, 9:33 AM

Dec 19 2018

pete updated the diff for D55869: Convert some ObjC retain/release msgSends to runtime calls.
Dec 19 2018, 10:58 PM
pete added a comment to D55869: Convert some ObjC retain/release msgSends to runtime calls.

So, once upon a time this was a problem because we were rewriting the method calls in the runtime itself. Can you explain how that's not a problem now? Do we just expect the runtime to be compiled with the right switch?

Dec 19 2018, 10:57 PM

Dec 18 2018

pete created D55869: Convert some ObjC retain/release msgSends to runtime calls.
Dec 18 2018, 4:52 PM
pete committed rL349559: Preserve the linkage for objc* intrinsics as clang will set them to….
Preserve the linkage for objc* intrinsics as clang will set them to…
Dec 18 2018, 2:45 PM
pete committed rL349558: Add nonlazybind to objc_retain/objc_release when converting from intrinsics..
Add nonlazybind to objc_retain/objc_release when converting from intrinsics.
Dec 18 2018, 2:34 PM
pete committed rL349552: Rewrite objc intrinsics to runtime methods in PreISelIntrinsicLowering instead….
Rewrite objc intrinsics to runtime methods in PreISelIntrinsicLowering instead…
Dec 18 2018, 2:23 PM
pete committed rC349535: Generate objc intrinsics instead of runtime calls as the ARC optimizer now….
Generate objc intrinsics instead of runtime calls as the ARC optimizer now…
Dec 18 2018, 12:36 PM
pete committed rL349535: Generate objc intrinsics instead of runtime calls as the ARC optimizer now….
Generate objc intrinsics instead of runtime calls as the ARC optimizer now…
Dec 18 2018, 12:36 PM
pete committed rL349534: Change the objc ARC optimizer to use the new objc.* intrinsics.
Change the objc ARC optimizer to use the new objc.* intrinsics
Dec 18 2018, 12:36 PM
pete closed D55802: Change CGObjC to use objc intrinsics instead of runtime methods.
Dec 18 2018, 12:36 PM
pete closed D55348: Change the objc ARC optimizer to use the new objc.* intrinsics.
Dec 18 2018, 12:36 PM

Dec 17 2018

pete added a comment to D55802: Change CGObjC to use objc intrinsics instead of runtime methods.

You're making intrinsics with weak_external linkage? I feel like that's going to be unnecessarily awkward in the future, but okay.

Dec 17 2018, 9:45 PM
pete created D55802: Change CGObjC to use objc intrinsics instead of runtime methods.
Dec 17 2018, 6:12 PM
pete added inline comments to D55348: Change the objc ARC optimizer to use the new objc.* intrinsics.
Dec 17 2018, 5:57 PM

Dec 7 2018

pete added a comment to D55349: Convert some ObjC alloc msgSends to runtime calls.

LGTM.

Dec 7 2018, 9:24 PM
pete committed rL348687: Convert some ObjC msgSends to runtime calls..
Convert some ObjC msgSends to runtime calls.
Dec 7 2018, 9:17 PM
pete committed rC348687: Convert some ObjC msgSends to runtime calls..
Convert some ObjC msgSends to runtime calls.
Dec 7 2018, 9:17 PM
pete updated the diff for D55349: Convert some ObjC alloc msgSends to runtime calls.

Added test for integer argument and updated code to only accept pointer types to allocWithZone.

Dec 7 2018, 2:01 PM
pete updated the diff for D55348: Change the objc ARC optimizer to use the new objc.* intrinsics.

I added the other objc* intrinsics used by ARC in r348646.

Dec 7 2018, 1:35 PM
pete committed rL348646: Follow-up from r348441 to add the rest of the objc ARC intrinsics..
Follow-up from r348441 to add the rest of the objc ARC intrinsics.
Dec 7 2018, 1:32 PM
pete added inline comments to D55349: Convert some ObjC alloc msgSends to runtime calls.
Dec 7 2018, 10:13 AM
pete updated the diff for D55349: Convert some ObjC alloc msgSends to runtime calls.

Thanks for the review. Have fixed the comments as suggested.

Dec 7 2018, 10:12 AM
pete accepted D55442: Update the Swift version numbers reported by objdump.

LGTM

Dec 7 2018, 10:03 AM

Dec 6 2018

pete added inline comments to D55348: Change the objc ARC optimizer to use the new objc.* intrinsics.
Dec 6 2018, 10:22 AM

Dec 5 2018

pete created D55349: Convert some ObjC alloc msgSends to runtime calls.
Dec 5 2018, 6:07 PM
pete created D55348: Change the objc ARC optimizer to use the new objc.* intrinsics.
Dec 5 2018, 5:26 PM
pete committed rL348441: Add objc.* ARC intrinsics and codegen them to their runtime methods..
Add objc.* ARC intrinsics and codegen them to their runtime methods.
Dec 5 2018, 4:56 PM
pete closed D55233: Add objc_retain and objc_release intrinsics and codegen them to their runtime methods.
Dec 5 2018, 4:55 PM
pete committed rC348431: Fix title underlines being too short after r348429.
Fix title underlines being too short after r348429
Dec 5 2018, 4:05 PM
pete committed rL348431: Fix title underlines being too short after r348429.
Fix title underlines being too short after r348429
Dec 5 2018, 4:05 PM
pete committed rL348429: Update ARC docs as objc_storeStrong returns void not id.
Update ARC docs as objc_storeStrong returns void not id
Dec 5 2018, 3:53 PM
pete committed rC348429: Update ARC docs as objc_storeStrong returns void not id.
Update ARC docs as objc_storeStrong returns void not id
Dec 5 2018, 3:52 PM
pete added a comment to D55233: Add objc_retain and objc_release intrinsics and codegen them to their runtime methods.

Discovered that objc_storeStrong is actually wrong in the documentation. Changing it from returning id to returning void. Will also update the docs.

Dec 5 2018, 9:06 AM

Dec 4 2018

pete added a comment to D55233: Add objc_retain and objc_release intrinsics and codegen them to their runtime methods.

LGTM

Dec 4 2018, 11:23 AM

Dec 3 2018

pete updated the diff for D55233: Add objc_retain and objc_release intrinsics and codegen them to their runtime methods.

Updated to add a comment to Intrinsics.td, remove the ReturnedValue<> and added all of the ARC methods from https://clang.llvm.org/docs/AutomaticReferenceCounting.html#runtime-support

Dec 3 2018, 6:34 PM
pete created D55233: Add objc_retain and objc_release intrinsics and codegen them to their runtime methods.
Dec 3 2018, 1:04 PM

Jul 2 2018

pete accepted D48517: [MC] Error on a .zerofill directive in a non-virtual section.

Sorry for the delay. LGTM.

Jul 2 2018, 10:02 AM

May 31 2018

pete accepted D47593: [MC] Fallback on DWARF when generating compact unwind on AArch64.

Nice catch. This LGTM.

May 31 2018, 9:22 AM

Apr 23 2018

pete added a comment to D30882: Add a callback for __has_include and use it for dependency scanning.

I don't think this is quite right. I know at least make-based incremental builds wouldn't deal well with this.

This is actually not a novel problem w.r.t. this patch. The exact same situation comes up with Makefile-included .d files and when one of the referenced headers is removed.

This is typically solved somewhere in the build system, for example Make has -include, and Ninja and llbuild have explicit support for this situation.

Of course, yes, I was wrong. Thanks for the correction.

I agree we might want to tread cautiously on how we change the .d output, but in this case I think it might be safe.

If we decide this isn't safe, then we may want to consider a new flag which tracks *all* anti-dependencies (file's for which Clang checked existence but did not exist), and include that here. The major concern with that approach is it is a much larger list, and while it would support being substantially more correct, it is also well beyond what people currently expect out of the build system + compiler generated deps approaches.

Even though this is likely safe, it seems really noisy. Consider the case where someone has __has_include(<missing>) -- we'll get an entry for every -I, -F, -isystem, and -iframework. If we're going to add that noise, I prefer a separate flag that covers all anti-dependencies.

Apr 23 2018, 9:50 AM

Mar 9 2018

pete accepted D44270: Improve caching scheme in ProvenanceAnalysis..

This all looks reasonable. Its a nice localized change to this pass. LGTM.

Mar 9 2018, 4:03 PM

May 10 2017

pete accepted D33057: [ConstantRange] Fix the early out in ConstantRange::multiply for positive numbers to really do what the comment says.

Good catch! LGTM.

May 10 2017, 12:25 PM

May 3 2017

pete accepted D32811: [IR] Abstract away ArgNo+1 attribute indexing as much as possible.

This is a great improvement over what we had. LGTM.

May 3 2017, 11:06 AM

Apr 10 2017

pete accepted D31198: [IR] Make AttributeSetNode public, avoid temporary AttributeList copies.

Sorry for forgetting to review this.

Apr 10 2017, 1:10 PM

Mar 20 2017

pete accepted D31102: Rename AttributeSet to AttributeList.

I scrolled through fairly quickly, but everything looked fine. Looks like basically renaming and fixing formatting along the way.

Mar 20 2017, 11:26 PM

Mar 13 2017

pete created D30882: Add a callback for __has_include and use it for dependency scanning.
Mar 13 2017, 1:01 AM
pete created D30881: Track skipped files in dependency scanning.
Mar 13 2017, 12:10 AM

Mar 8 2017

pete added a comment to D30723: Add red zones to BumpPtrAllocator under ASan.

Thanks, Pete! Will land soon, then.

I think we could support SpecificBumpPtrAllocator but it would require walking the objects by 'sizeof(T) + RedZoneSize'. RedZoneSize itself would also have to be set to make sure we continue to have appropriate alignment. Not something you need to do now, but could be interesting in future.

FWIW, this doesn't work as is because SpecificBumpPtrAllocator lets you allocate *arrays* of objects as well as single objects, and the arrays obviously can't have red zones between elements.

Good point. Never thought of that. Wouldn't be surprised if there's a whole bunch of users who never use arrays and could benefit, but still something to think about more.

Mar 8 2017, 11:48 AM
pete accepted D30723: Add red zones to BumpPtrAllocator under ASan.

Very cool. Justin and I looked at ASan on BumpPtrAllocator a while ago and I think this would have been useful then too. I think the reason you didn't find issues is that he fixed many of them already.

Mar 8 2017, 11:34 AM

Sep 30 2016

pete added a comment to D25100: Add STLExtras apply_tuple.

Whats the behavior here in terms of implicit conversions and overloading?

Sep 30 2016, 2:30 PM

Aug 23 2016

pete committed rL279528: Fix some more asserts after r279466..
Fix some more asserts after r279466.
Aug 23 2016, 9:31 AM

Aug 22 2016

pete committed rL279487: Fix crash from assert in r279466..
Fix crash from assert in r279466.
Aug 22 2016, 3:35 PM
pete committed rL279470: Add ADT headers to the cmake headers directory for LLVMSupport. NFC..
Add ADT headers to the cmake headers directory for LLVMSupport. NFC.
Aug 22 2016, 1:47 PM
pete committed rL279466: Add comments and an assert to follow-up on r279113. NFC..
Add comments and an assert to follow-up on r279113. NFC.
Aug 22 2016, 1:26 PM

Aug 18 2016

pete committed rL279113: Add a version of Intrinsic::getName which is more efficient when there are no….
Add a version of Intrinsic::getName which is more efficient when there are no…
Aug 18 2016, 11:39 AM

Aug 17 2016

pete committed rL279000: Actually enable new test for const RangeAdapter. Missing from r278991.
Actually enable new test for const RangeAdapter. Missing from r278991
Aug 17 2016, 4:00 PM
pete committed rL278991: Fix reverse to work on const rbegin()/rend()..
Fix reverse to work on const rbegin()/rend().
Aug 17 2016, 3:15 PM

Aug 12 2016

pete committed rL278585: Constify ValueTracking. NFC..
Constify ValueTracking. NFC.
Aug 12 2016, 6:13 PM
pete committed rL278570: Add support to paternmatch for simple const Value cases..
Add support to paternmatch for simple const Value cases.
Aug 12 2016, 3:24 PM
pete committed rL278528: constify InstCombine::foldAllocaCmp. NFC..
constify InstCombine::foldAllocaCmp. NFC.
Aug 12 2016, 10:21 AM

Aug 11 2016

pete committed rL278450: Refactor isValidAssumeForContext to reduce duplication and indentation. NFC..
Refactor isValidAssumeForContext to reduce duplication and indentation. NFC.
Aug 11 2016, 6:08 PM
pete committed rL278434: Remove unnecessary extra version of isValidAssumeForContext. NFC..
Remove unnecessary extra version of isValidAssumeForContext. NFC.
Aug 11 2016, 3:31 PM
pete committed rL278419: Dead strip DESC bits should only be set on object files..
Dead strip DESC bits should only be set on object files.
Aug 11 2016, 2:35 PM
pete committed rL278412: Add obj2yaml to the list of tool_patterns in lit. NFC.
Add obj2yaml to the list of tool_patterns in lit. NFC
Aug 11 2016, 2:11 PM
pete committed rL278407: Better compress lazy binding info to match ld64..
Better compress lazy binding info to match ld64.
Aug 11 2016, 2:07 PM
pete committed rL278405: Generate slightly more compressed binding opcodes when entries are the same….
Generate slightly more compressed binding opcodes when entries are the same…
Aug 11 2016, 1:44 PM
pete committed rL278400: Add test for rebase opcodes. We didn't have one. NFC..
Add test for rebase opcodes. We didn't have one. NFC.
Aug 11 2016, 1:39 PM
pete committed rL278399: Add missing RUN line from r278398. This test works with this line but i….
Add missing RUN line from r278398. This test works with this line but i…
Aug 11 2016, 1:31 PM
pete committed rL278398: Arm64 stubs alignment is 2, not 4..
Arm64 stubs alignment is 2, not 4.
Aug 11 2016, 1:26 PM
pete committed rL278396: Change when we choose to add an LC_LOAD_DYLIB to the final image..
Change when we choose to add an LC_LOAD_DYLIB to the final image.
Aug 11 2016, 1:18 PM
pete committed rL278386: Change all the libSystem test files to be dylibs instead of normalized files..
Change all the libSystem test files to be dylibs instead of normalized files.
Aug 11 2016, 11:54 AM
pete committed rL278385: Fix one more test missed by r278372. The next commit will update libsystem….
Fix one more test missed by r278372. The next commit will update libsystem…
Aug 11 2016, 11:51 AM
pete committed rL278381: Fix off-by-one error in default currentVersion..
Fix off-by-one error in default currentVersion.
Aug 11 2016, 11:49 AM
pete committed rL278372: Have one version of libSystem for each arch. NFC..
Have one version of libSystem for each arch. NFC.
Aug 11 2016, 11:17 AM

Aug 8 2016

pete committed rL278071: The first string table entry should be a null terminated space, not just null..
The first string table entry should be a null terminated space, not just null.
Aug 8 2016, 4:27 PM

Aug 5 2016

pete committed rL277869: ExportTrie nodes need to be visisted in order..
ExportTrie nodes need to be visisted in order.
Aug 5 2016, 2:45 PM

Jul 27 2016

pete added inline comments to D22793: IR: Introduce inbounds attribute on getelementptr indices..
Jul 27 2016, 6:29 PM

Jul 22 2016

pete committed rL276470: Use RValue refs in APInt add/sub methods..
Use RValue refs in APInt add/sub methods.
Jul 22 2016, 2:03 PM

Jul 21 2016

pete committed rL276382: Fix r276380 for targets without REALPATH..
Fix r276380 for targets without REALPATH.
Jul 21 2016, 7:00 PM
pete closed D22655: Avoid dsymutil calls to getFileNameByIndex.

Thanks for the quick review Fred. Those comments make complete sense so have committed with those changes.

Jul 21 2016, 6:49 PM
pete committed rL276380: Avoid dsymutil calls to getFileNameByIndex..
Avoid dsymutil calls to getFileNameByIndex.
Jul 21 2016, 6:49 PM
pete retitled D22655: Avoid dsymutil calls to getFileNameByIndex from to Avoid dsymutil calls to getFileNameByIndex.
Jul 21 2016, 3:45 PM

Jun 2 2016

pete committed rL271556: Make APInt negate just do a 2's complement negate instead of subtract. NFC..
Make APInt negate just do a 2's complement negate instead of subtract. NFC.
Jun 2 2016, 11:18 AM

May 27 2016

pete closed D20723: Don't generate unnecessary signed ConstantRange during multiply.

Thanks for the quick review! r271020.

May 27 2016, 10:14 AM
pete committed rL271020: Don't generate unnecessary signed ConstantRange during multiply. NFC.
Don't generate unnecessary signed ConstantRange during multiply. NFC
May 27 2016, 10:13 AM