Page MenuHomePhabricator

ahatanak (Akira Hatanaka)
User

Projects

User does not belong to any projects.

User Details

User Since
Dec 4 2013, 1:37 PM (284 w, 3 d)

Recent Activity

Thu, May 16

ahatanak added a comment to D61808: [ObjC] Replace uses of the argument of a call to objc_autorelease with the result in MRR.

We discussed this before, but we already break the base ObjC rules since the runtime elides the autorelease message send in MRR when it's possible to perform the retainRV/autoreleaseRV optimization, which only happens when the caller (or a caller higher up in the call-chain if it's tail-called) is compiled with ARC. IIUC, the only semantic change we''ll be making if we emit an objc_autoreleaseReturnValue call instead of an objc_autorelease call is that we no longer guarantee that the message send will happen when the class overrides the autorelease method, which we do guarantee with calls to objc_autorelease (see objc_object::autorelease and objc_object::rootAutorelease in the link below).

Thu, May 16, 5:40 PM · Restricted Project
ahatanak added inline comments to D61974: [ObjC] Fix encoding of ObjC pointer types that are pointers to typedefs.
Thu, May 16, 4:01 PM · Restricted Project
ahatanak added a comment to D61808: [ObjC] Replace uses of the argument of a call to objc_autorelease with the result in MRR.

The assumption that these methods return the receiver is not true without additional semantic assumptions about these methods, so the current behavior of unconditionally turning [x autorelease] into objc_autorelease(x), x seems quite broken.

Because it's possible to override an autorelease method and make the method return something other than the passed argument, for example?

If it's not possible to assume that the method returns the passed argument in MRR, the direction of this patch and https://reviews.llvm.org/D61970 is completely wrong.

Well, objc_retain and objc_autorelease (and objc_release, trivially) do return the normal return value of the message send in MRR, so assuming that's preserved in the IR, you just need to use that as the expression result. But if the backend's going to unconditionally optimize the intrinsics based on the assumption that those values are the same, that's problematic, just as it would be problematic for it to do ARC-approved reordering on intrinsics emitted for MRR.

Thu, May 16, 3:35 PM · Restricted Project
ahatanak added inline comments to D61970: [CodeGen][ObjC] Call objc_autoreleaseReturnValue and objc_retainAutoreleasedReturnValue instead of objc_autorelease and objc_retain in MRR.
Thu, May 16, 3:10 PM · Restricted Project
ahatanak added inline comments to D61970: [CodeGen][ObjC] Call objc_autoreleaseReturnValue and objc_retainAutoreleasedReturnValue instead of objc_autorelease and objc_retain in MRR.
Thu, May 16, 3:06 PM · Restricted Project
ahatanak added a comment to D61808: [ObjC] Replace uses of the argument of a call to objc_autorelease with the result in MRR.

The assumption that these methods return the receiver is not true without additional semantic assumptions about these methods, so the current behavior of unconditionally turning [x autorelease] into objc_autorelease(x), x seems quite broken.

Thu, May 16, 2:49 PM · Restricted Project

Wed, May 15

ahatanak added inline comments to D61970: [CodeGen][ObjC] Call objc_autoreleaseReturnValue and objc_retainAutoreleasedReturnValue instead of objc_autorelease and objc_retain in MRR.
Wed, May 15, 11:57 PM · Restricted Project
ahatanak updated the diff for D61970: [CodeGen][ObjC] Call objc_autoreleaseReturnValue and objc_retainAutoreleasedReturnValue instead of objc_autorelease and objc_retain in MRR.

Run the main ARC optimization passes when ObjCNoBuiltinRetainRelease is not set.

Wed, May 15, 11:57 PM · Restricted Project
ahatanak created D61974: [ObjC] Fix encoding of ObjC pointer types that are pointers to typedefs.
Wed, May 15, 6:48 PM · Restricted Project
ahatanak created D61970: [CodeGen][ObjC] Call objc_autoreleaseReturnValue and objc_retainAutoreleasedReturnValue instead of objc_autorelease and objc_retain in MRR.
Wed, May 15, 5:03 PM · Restricted Project
ahatanak accepted D61957: [CodeGenObjC] invoke objc_autorelease, objc_retain when necessary.

LGTM

Wed, May 15, 12:01 PM · Restricted Project

Sat, May 11

ahatanak planned changes to D61808: [ObjC] Replace uses of the argument of a call to objc_autorelease with the result in MRR.

Someone reminded me that I could replace the MRR call to objc_autorelease with the ARC call to objc_autoreleaseReturnValue in the front-end. I'm going to try that idea.

Sat, May 11, 12:39 AM · Restricted Project

Fri, May 10

ahatanak created D61808: [ObjC] Replace uses of the argument of a call to objc_autorelease with the result in MRR.
Fri, May 10, 3:30 PM · Restricted Project
ahatanak committed rG34d28cf25f38: [CodeGen][ObjC] Emit invoke instead of call to call `objc_release` when… (authored by ahatanak).
[CodeGen][ObjC] Emit invoke instead of call to call `objc_release` when…
Fri, May 10, 2:53 PM
ahatanak committed rL360474: [CodeGen][ObjC] Emit invoke instead of call to call `objc_release` when.
[CodeGen][ObjC] Emit invoke instead of call to call `objc_release` when
Fri, May 10, 2:52 PM
ahatanak committed rC360474: [CodeGen][ObjC] Emit invoke instead of call to call `objc_release` when.
[CodeGen][ObjC] Emit invoke instead of call to call `objc_release` when
Fri, May 10, 2:51 PM
ahatanak closed D61803: [CodeGen][ObjC] Emit invoke instead of call to call `objc_release` when necessary..
Fri, May 10, 2:51 PM · Restricted Project, Restricted Project
ahatanak updated the diff for D61803: [CodeGen][ObjC] Emit invoke instead of call to call `objc_release` when necessary..

Just call EmitCallOrInvoke.

Fri, May 10, 2:10 PM · Restricted Project, Restricted Project
ahatanak created D61803: [CodeGen][ObjC] Emit invoke instead of call to call `objc_release` when necessary..
Fri, May 10, 1:31 PM · Restricted Project, Restricted Project

Thu, May 9

ahatanak committed rGc39a243da651: Assume `__cxa_allocate_exception` returns an under-aligned memory on Darwin if… (authored by ahatanak).
Assume `__cxa_allocate_exception` returns an under-aligned memory on Darwin if…
Thu, May 9, 7:15 PM
ahatanak committed rL360404: Assume `__cxa_allocate_exception` returns an under-aligned memory on.
Assume `__cxa_allocate_exception` returns an under-aligned memory on
Thu, May 9, 7:14 PM
ahatanak committed rC360404: Assume `__cxa_allocate_exception` returns an under-aligned memory on.
Assume `__cxa_allocate_exception` returns an under-aligned memory on
Thu, May 9, 7:14 PM
ahatanak closed D61667: Assume `__cxa_allocate_exception` returns an under-aligned memory on Darwin if the version of libc++abi isn't new enough to include the fix in r319123.
Thu, May 9, 7:14 PM · Restricted Project
ahatanak updated the diff for D61667: Assume `__cxa_allocate_exception` returns an under-aligned memory on Darwin if the version of libc++abi isn't new enough to include the fix in r319123.

Update the comment in CheckCXXThrowOperand.

Thu, May 9, 5:22 PM · Restricted Project
ahatanak updated the diff for D61667: Assume `__cxa_allocate_exception` returns an under-aligned memory on Darwin if the version of libc++abi isn't new enough to include the fix in r319123.

Address review comments.

Thu, May 9, 4:29 PM · Restricted Project
ahatanak added inline comments to D61667: Assume `__cxa_allocate_exception` returns an under-aligned memory on Darwin if the version of libc++abi isn't new enough to include the fix in r319123.
Thu, May 9, 4:29 PM · Restricted Project
ahatanak committed rGb1271cceca7a: Specify target triple to fix the tests I committed in r360359 that are still… (authored by ahatanak).
Specify target triple to fix the tests I committed in r360359 that are still…
Thu, May 9, 11:30 AM
ahatanak committed rL360363: Specify target triple to fix the tests I committed in r360359 that are.
Specify target triple to fix the tests I committed in r360359 that are
Thu, May 9, 11:30 AM
ahatanak committed rC360363: Specify target triple to fix the tests I committed in r360359 that are.
Specify target triple to fix the tests I committed in r360359 that are
Thu, May 9, 11:30 AM
ahatanak committed rGe406f0eec64f: Specify ObjC runtime to fix the tests I committed in r360359 that are failing. (authored by ahatanak).
Specify ObjC runtime to fix the tests I committed in r360359 that are failing.
Thu, May 9, 11:06 AM
ahatanak committed rC360361: Specify ObjC runtime to fix the tests I committed in r360359 that are.
Specify ObjC runtime to fix the tests I committed in r360359 that are
Thu, May 9, 11:03 AM
ahatanak committed rL360361: Specify ObjC runtime to fix the tests I committed in r360359 that are.
Specify ObjC runtime to fix the tests I committed in r360359 that are
Thu, May 9, 11:03 AM
ahatanak committed rG187770dc7498: [CodeGen][ObjC] Remove the leading `l_` from ObjC symbols and make private… (authored by ahatanak).
[CodeGen][ObjC] Remove the leading `l_` from ObjC symbols and make private…
Thu, May 9, 10:45 AM
ahatanak committed rC360359: [CodeGen][ObjC] Remove the leading `l_` from ObjC symbols and make.
[CodeGen][ObjC] Remove the leading `l_` from ObjC symbols and make
Thu, May 9, 10:45 AM
ahatanak committed rL360359: [CodeGen][ObjC] Remove the leading `l_` from ObjC symbols and make.
[CodeGen][ObjC] Remove the leading `l_` from ObjC symbols and make
Thu, May 9, 10:45 AM
ahatanak closed D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal..
Thu, May 9, 10:45 AM · Restricted Project

Wed, May 8

ahatanak updated the diff for D61667: Assume `__cxa_allocate_exception` returns an under-aligned memory on Darwin if the version of libc++abi isn't new enough to include the fix in r319123.

Move the code that was in AlignedExceptionObject.h to getExnObjectAlignment and remove the header.

Wed, May 8, 1:40 PM · Restricted Project
ahatanak added inline comments to D61667: Assume `__cxa_allocate_exception` returns an under-aligned memory on Darwin if the version of libc++abi isn't new enough to include the fix in r319123.
Wed, May 8, 1:40 PM · Restricted Project
ahatanak created D61667: Assume `__cxa_allocate_exception` returns an under-aligned memory on Darwin if the version of libc++abi isn't new enough to include the fix in r319123.
Wed, May 8, 2:22 AM · Restricted Project

Tue, May 7

ahatanak updated the diff for D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal..

Define helper function getLinkageTypeForObjCMetadata.

Tue, May 7, 8:28 PM · Restricted Project

Fri, May 3

ahatanak updated the diff for D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal..

Make sure private linkage is replaced with internal linkage only when the object file format is MachO.

Fri, May 3, 6:04 PM · Restricted Project
ahatanak added inline comments to D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal..
Fri, May 3, 1:05 AM · Restricted Project
ahatanak added inline comments to D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal..
Fri, May 3, 12:49 AM · Restricted Project
ahatanak committed rG8cd01e69d8ee: [Sema][ObjC] Disable -Wunused-parameter for ObjC methods (authored by ahatanak).
[Sema][ObjC] Disable -Wunused-parameter for ObjC methods
Fri, May 3, 12:21 AM
ahatanak committed rC359864: [Sema][ObjC] Disable -Wunused-parameter for ObjC methods.
[Sema][ObjC] Disable -Wunused-parameter for ObjC methods
Fri, May 3, 12:21 AM
ahatanak committed rL359864: [Sema][ObjC] Disable -Wunused-parameter for ObjC methods.
[Sema][ObjC] Disable -Wunused-parameter for ObjC methods
Fri, May 3, 12:21 AM
ahatanak closed D61147: [Sema][ObjC] Disable -Wunused-parameter for ObjC methods.
Fri, May 3, 12:21 AM · Restricted Project, Restricted Project

Thu, May 2

ahatanak updated the diff for D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal..
  • Instead of passing a flag to CreateMetadataVar that indicates the section is in segment __DATA, just scan the section name string inside CreateMetadataVar.
  • Fix test case ns-constant-strings.m.
Thu, May 2, 10:31 PM · Restricted Project
ahatanak added inline comments to D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal..
Thu, May 2, 3:40 PM · Restricted Project
ahatanak added inline comments to D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal..
Thu, May 2, 3:24 PM · Restricted Project
ahatanak updated the diff for D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal..

Address review comments.

Thu, May 2, 3:24 PM · Restricted Project
ahatanak created D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal..
Thu, May 2, 10:59 AM · Restricted Project
ahatanak committed rGda7ae979f8f8: Fix typo in test case. (authored by ahatanak).
Fix typo in test case.
Thu, May 2, 12:36 AM
ahatanak committed rL359761: Fix typo in test case..
Fix typo in test case.
Thu, May 2, 12:36 AM
ahatanak committed rC359761: Fix typo in test case..
Fix typo in test case.
Thu, May 2, 12:36 AM

Tue, Apr 30

ahatanak added a comment to D61147: [Sema][ObjC] Disable -Wunused-parameter for ObjC methods.

I would also recommend that you go fix the warning to never fire on virtual C++ methods.

Tue, Apr 30, 4:04 PM · Restricted Project, Restricted Project
ahatanak updated the diff for D61147: [Sema][ObjC] Disable -Wunused-parameter for ObjC methods.

Disable the warning for ObjC methods.

Tue, Apr 30, 3:56 PM · Restricted Project, Restricted Project

Thu, Apr 25

ahatanak added a comment to D61147: [Sema][ObjC] Disable -Wunused-parameter for ObjC methods.

Yes, I guess we can make -Wunused-parameter cover unused parameters of pure @implementation methods too since users can probably just remove them to silence the warning.

Thu, Apr 25, 8:47 PM · Restricted Project, Restricted Project
ahatanak added a comment to D61147: [Sema][ObjC] Disable -Wunused-parameter for ObjC methods.

Yeah, I tend to think we should just suppress this unconditionally in Objective-C.

IMO this warning still makes sense for normal functions, or methods that are only declared in an @implementation. Adding a fix-it to cast to void in the function/method body would probably go a long way too.

Thu, Apr 25, 3:29 PM · Restricted Project, Restricted Project
ahatanak created D61147: [Sema][ObjC] Disable -Wunused-parameter for ObjC methods.
Thu, Apr 25, 1:42 PM · Restricted Project, Restricted Project
ahatanak committed rG8edf8f317b59: [ObjC][ARC] Let ARC optimizer bail out if the number of pointer states it keeps… (authored by ahatanak).
[ObjC][ARC] Let ARC optimizer bail out if the number of pointer states it keeps…
Thu, Apr 25, 12:42 PM
ahatanak committed rL359226: [ObjC][ARC] Let ARC optimizer bail out if the number of pointer states.
[ObjC][ARC] Let ARC optimizer bail out if the number of pointer states
Thu, Apr 25, 12:41 PM
ahatanak closed D61100: [ObjC][ARC] Let ARC optimizer bail out if the number of pointer states it keeps track of becomes too large.
Thu, Apr 25, 12:41 PM · Restricted Project

Wed, Apr 24

ahatanak added a comment to D61100: [ObjC][ARC] Let ARC optimizer bail out if the number of pointer states it keeps track of becomes too large.

The test case I'm looking at has a function with over 500k instructions and lots of ObjC runtime function calls.

Wed, Apr 24, 3:52 PM · Restricted Project
ahatanak created D61100: [ObjC][ARC] Let ARC optimizer bail out if the number of pointer states it keeps track of becomes too large.
Wed, Apr 24, 3:36 PM · Restricted Project

Tue, Apr 23

ahatanak committed rG53796d943901: Improve -Wuninitialized warning under ARC for block variables that are… (authored by ahatanak).
Improve -Wuninitialized warning under ARC for block variables that are…
Tue, Apr 23, 4:51 PM
ahatanak committed rC359049: Improve -Wuninitialized warning under ARC for block variables that are.
Improve -Wuninitialized warning under ARC for block variables that are
Tue, Apr 23, 4:51 PM
ahatanak committed rL359049: Improve -Wuninitialized warning under ARC for block variables that are.
Improve -Wuninitialized warning under ARC for block variables that are
Tue, Apr 23, 4:51 PM
ahatanak committed rG5c3117b0a98d: [ObjC][ARC] Check the basic block size before calling DominatorTree::dominate. (authored by ahatanak).
[ObjC][ARC] Check the basic block size before calling DominatorTree::dominate.
Tue, Apr 23, 12:48 PM
ahatanak committed rL359027: [ObjC][ARC] Check the basic block size before calling.
[ObjC][ARC] Check the basic block size before calling
Tue, Apr 23, 12:47 PM
ahatanak closed D60900: [ObjC][ARC] Check the basic block size before calling DominatorTree::dominate.
Tue, Apr 23, 12:47 PM · Restricted Project, Restricted Project

Fri, Apr 19

ahatanak removed a project from D60900: [ObjC][ARC] Check the basic block size before calling DominatorTree::dominate: Restricted Project.
Fri, Apr 19, 6:20 PM · Restricted Project, Restricted Project
ahatanak removed a project from D60900: [ObjC][ARC] Check the basic block size before calling DominatorTree::dominate: Restricted Project.
Fri, Apr 19, 6:19 PM · Restricted Project, Restricted Project
ahatanak updated the diff for D60900: [ObjC][ARC] Check the basic block size before calling DominatorTree::dominate.

Fix the comment on why we have to check the size of the basic block before calling DominatorTree::dominate to compute the dominance relation between two instructions in the same basic block.

Fri, Apr 19, 6:15 PM · Restricted Project, Restricted Project

Apr 18 2019

ahatanak created D60900: [ObjC][ARC] Check the basic block size before calling DominatorTree::dominate.
Apr 18 2019, 11:26 PM · Restricted Project, Restricted Project

Apr 17 2019

ahatanak committed rGf8268f67f562: Move the implementation of getInnermostBlockDecl to the .cpp file to fix… (authored by ahatanak).
Move the implementation of getInnermostBlockDecl to the .cpp file to fix…
Apr 17 2019, 4:59 PM
ahatanak committed rC358627: Move the implementation of getInnermostBlockDecl to the .cpp file to fix.
Move the implementation of getInnermostBlockDecl to the .cpp file to fix
Apr 17 2019, 4:58 PM
ahatanak committed rL358627: Move the implementation of getInnermostBlockDecl to the .cpp file to fix.
Move the implementation of getInnermostBlockDecl to the .cpp file to fix
Apr 17 2019, 4:58 PM
ahatanak committed rGac57af32843f: [Sema][ObjC] Don't warn about an implicitly retained self if the retaining… (authored by ahatanak).
[Sema][ObjC] Don't warn about an implicitly retained self if the retaining…
Apr 17 2019, 4:14 PM
ahatanak committed rG0b19f5aef94c: Fix formatting. NFC (authored by ahatanak).
Fix formatting. NFC
Apr 17 2019, 4:14 PM
ahatanak committed rC358624: [Sema][ObjC] Don't warn about an implicitly retained self if the.
[Sema][ObjC] Don't warn about an implicitly retained self if the
Apr 17 2019, 4:14 PM
ahatanak committed rL358624: [Sema][ObjC] Don't warn about an implicitly retained self if the.
[Sema][ObjC] Don't warn about an implicitly retained self if the
Apr 17 2019, 4:13 PM
ahatanak closed D60736: [Sema][ObjC] Don't warn about a block implicitly retaining self if the block is marked noescape.
Apr 17 2019, 4:13 PM · Restricted Project, Restricted Project
ahatanak committed rL358623: Fix formatting. NFC.
Fix formatting. NFC
Apr 17 2019, 4:13 PM
ahatanak updated the diff for D60736: [Sema][ObjC] Don't warn about a block implicitly retaining self if the block is marked noescape.

Diagnose implicitly retained self in ActOnFinishFunctionBody.

Apr 17 2019, 3:22 PM · Restricted Project, Restricted Project
ahatanak updated the diff for D60736: [Sema][ObjC] Don't warn about a block implicitly retaining self if the block is marked noescape.

Rename function.

Apr 17 2019, 11:00 AM · Restricted Project, Restricted Project
ahatanak added inline comments to D60736: [Sema][ObjC] Don't warn about a block implicitly retaining self if the block is marked noescape.
Apr 17 2019, 9:53 AM · Restricted Project, Restricted Project
ahatanak updated the diff for D60736: [Sema][ObjC] Don't warn about a block implicitly retaining self if the block is marked noescape.

Remove a potentially expensive check.

Apr 17 2019, 9:53 AM · Restricted Project, Restricted Project

Apr 16 2019

ahatanak updated the diff for D60736: [Sema][ObjC] Don't warn about a block implicitly retaining self if the block is marked noescape.

Keep a list of pairs of BlockDecl and SourceLocation and, after the body of an ObjC method is parsed, emit a diagnostic if a SourceLocation in the list is inside an escaping block.

Apr 16 2019, 6:01 PM · Restricted Project, Restricted Project

Apr 15 2019

ahatanak added a comment to D60736: [Sema][ObjC] Don't warn about a block implicitly retaining self if the block is marked noescape.

Sorry, clang was failing to diagnose self referenced inside a c++ lambda that was nested inside a block.

Apr 15 2019, 4:36 PM · Restricted Project, Restricted Project
ahatanak created D60736: [Sema][ObjC] Don't warn about a block implicitly retaining self if the block is marked noescape.
Apr 15 2019, 3:38 PM · Restricted Project, Restricted Project

Apr 12 2019

ahatanak accepted D60626: [clang] Aligned allocation is actually supported in macosx 10.13.

LGTM

Apr 12 2019, 4:21 PM · Restricted Project, Restricted Project

Apr 9 2019

ahatanak committed rC358048: [CodeGen][ObjC] Emit the retainRV marker as a module flag instead of.
[CodeGen][ObjC] Emit the retainRV marker as a module flag instead of
Apr 9 2019, 11:19 PM
ahatanak committed rG60c3a3b6d0f1: [CodeGen][ObjC] Emit the retainRV marker as a module flag instead of named… (authored by ahatanak).
[CodeGen][ObjC] Emit the retainRV marker as a module flag instead of named…
Apr 9 2019, 11:19 PM
ahatanak committed rG9ca9d32b6be0: [ObjC][ARC] Convert the retainRV marker that is passed as a named metadata into… (authored by ahatanak).
[ObjC][ARC] Convert the retainRV marker that is passed as a named metadata into…
Apr 9 2019, 11:19 PM
ahatanak committed rL358048: [CodeGen][ObjC] Emit the retainRV marker as a module flag instead of.
[CodeGen][ObjC] Emit the retainRV marker as a module flag instead of
Apr 9 2019, 11:19 PM
ahatanak closed D60302: [CodeGen][ObjC] Emit the retainRV marker as a module flag instead of named metadata..
Apr 9 2019, 11:18 PM · Restricted Project, Restricted Project
ahatanak committed rL358047: [ObjC][ARC] Convert the retainRV marker that is passed as a named.
[ObjC][ARC] Convert the retainRV marker that is passed as a named
Apr 9 2019, 11:18 PM
ahatanak closed D60303: [ObjC][ARC] Emit the retainRV marker as a module flag instead of named metadata..
Apr 9 2019, 11:18 PM · Restricted Project
ahatanak added a comment to D60161: Expose non-trivial struct helpers for Swift..

Just one minor comment, but otherwise the patch looks good to me.

Apr 9 2019, 10:42 PM · Restricted Project