ahatanak (Akira Hatanaka)
User

Projects

User does not belong to any projects.

User Details

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

Recent Activity

Thu, Sep 21

ahatanak closed D38141: Annotate function parameters with attribute 'noescape'.

Thanks, committed in r313929.

Thu, Sep 21, 9:19 PM
ahatanak committed rL313952: Add test cases that weren't committed in r313945..
Add test cases that weren't committed in r313945.
Thu, Sep 21, 6:56 PM
ahatanak committed rL313945: Add support for attribute 'noescape'..
Add support for attribute 'noescape'.
Thu, Sep 21, 5:42 PM
ahatanak committed rL313929: [tsan] Annotate function parameters with attribute 'noescape'..
[tsan] Annotate function parameters with attribute 'noescape'.
Thu, Sep 21, 3:18 PM
ahatanak added inline comments to D32520: Support __fp16 vectors.
Thu, Sep 21, 2:58 PM
ahatanak updated the diff for D32520: Support __fp16 vectors.

Address review comments.

Thu, Sep 21, 2:57 PM
ahatanak updated the diff for D38141: Annotate function parameters with attribute 'noescape'.

Use DISPATCH_NOESCAPE instead of "attribute((noescape))".

Thu, Sep 21, 11:38 AM
ahatanak added a comment to D38141: Annotate function parameters with attribute 'noescape'.

That's what we should do here. Since the file includes dispatch.h, we should be able to just use the DISPATCH_NOESCAPE macro, which already uses #if __has_attribute.

Thu, Sep 21, 11:31 AM
ahatanak added a comment to D38141: Annotate function parameters with attribute 'noescape'.

What happens when building this code with a compiler that doesn't understand __attribute__((__noescape__))? Is it just ignored?

Thu, Sep 21, 10:41 AM
ahatanak created D38141: Annotate function parameters with attribute 'noescape'.
Thu, Sep 21, 9:54 AM

Wed, Sep 20

ahatanak accepted D38009: [Sema] Fix using old initializer during switch statement transformation..

I think this is correct.

Wed, Sep 20, 10:52 PM
ahatanak created D38118: [CodeGen][ObjC] Build the global block structure before emitting the body of global block invoke functions.
Wed, Sep 20, 8:53 PM

Tue, Sep 19

ahatanak committed rL313725: Revert "Add support for attribute 'noescape'.".
Revert "Add support for attribute 'noescape'."
Tue, Sep 19, 11:57 PM
ahatanak updated the diff for D32520: Support __fp16 vectors.

Upload the rebased patch again.

Tue, Sep 19, 11:43 PM
ahatanak reopened D32520: Support __fp16 vectors.

Reopening this review. I accidentally closed this review when I committed r313717 (the patch that adds support for 'noescape').

Tue, Sep 19, 11:39 PM
ahatanak closed D32210: [Sema][ObjC] Add support for attribute "noescape".
Tue, Sep 19, 11:39 PM
ahatanak accepted D32210: [Sema][ObjC] Add support for attribute "noescape".

This one can be closed.

Tue, Sep 19, 11:39 PM
ahatanak reopened D32210: [Sema][ObjC] Add support for attribute "noescape".

Reopening this review. I accidentally closed this review when I committed r313717 (the patch that adds support for 'noescape').

Tue, Sep 19, 11:37 PM
ahatanak committed rL313722: Add support for attribute 'noescape'..
Add support for attribute 'noescape'.
Tue, Sep 19, 11:34 PM
ahatanak closed D32210: [Sema][ObjC] Add support for attribute "noescape" by committing rL313722: Add support for attribute 'noescape'..
Tue, Sep 19, 11:34 PM
ahatanak committed rL313721: Revert "Add support for attribute 'noescape'.".
Revert "Add support for attribute 'noescape'."
Tue, Sep 19, 11:29 PM
ahatanak committed rL313720: Add support for attribute 'noescape'..
Add support for attribute 'noescape'.
Tue, Sep 19, 11:24 PM
ahatanak closed D32520: Support __fp16 vectors by committing rL313720: Add support for attribute 'noescape'..
Tue, Sep 19, 11:24 PM
ahatanak committed rL313717: [Sema][ObjC] Warn about mismatches in attributes between overriding and.
[Sema][ObjC] Warn about mismatches in attributes between overriding and
Tue, Sep 19, 10:41 PM
ahatanak added a comment to D36915: [Sema] Diagnose local variables and parameters captured by lambda and block expressions in a default argument.

ping

Tue, Sep 19, 10:24 AM

Fri, Sep 15

ahatanak added inline comments to D32210: [Sema][ObjC] Add support for attribute "noescape".
Fri, Sep 15, 11:27 AM
ahatanak updated the diff for D32210: [Sema][ObjC] Add support for attribute "noescape".

Address review comments.

Fri, Sep 15, 11:24 AM

Thu, Sep 14

ahatanak updated the diff for D32520: Support __fp16 vectors.

Rebase.

Thu, Sep 14, 3:35 PM
ahatanak accepted D37322: [Sema] Correct typos in LHS, RHS before building a binop expression..

I see. It looks like there is an ambiguity between 'new_anotation' and 'new_annotations' that can't be resolved in ActOnMemberAccessExpr because they have the same distance from 'new_annotation'. This doesn't happen if the full expression (new_annotation->Swap) is typo-corrected because 'new_anotation' will be the only valid choice in that case.

Thu, Sep 14, 2:06 PM

Tue, Sep 12

ahatanak added a comment to D37322: [Sema] Correct typos in LHS, RHS before building a binop expression..

I was thinking about correcting the typo in Sema::ActOnMemberAccessExpr before checking whether Base is dependent. Doing so would cause BuildMemberReferenceExpr to be called instead of ActOnDependentMemberExpr.

Tue, Sep 12, 4:50 PM
ahatanak accepted D37777: [Driver] Disable uwtable by default in -ffreestanding mode.

LGTM

Tue, Sep 12, 3:51 PM

Mon, Sep 11

ahatanak updated the diff for D36915: [Sema] Diagnose local variables and parameters captured by lambda and block expressions in a default argument.

Address review comments.

Mon, Sep 11, 7:31 PM

Fri, Sep 1

ahatanak added a comment to D37322: [Sema] Correct typos in LHS, RHS before building a binop expression..

Is it possible to avoid creating CXXDependentScopeMemberExpr in the first place? It seems to me that we shouldn't be creating a CXXDependentScopeMemberExpr for an ObjC property access.

Fri, Sep 1, 12:11 PM

Thu, Aug 31

ahatanak committed rL312266: [ObjCARC] Pass the correct BasicBlock to fix assertion failure..
[ObjCARC] Pass the correct BasicBlock to fix assertion failure.
Thu, Aug 31, 11:29 AM

Mon, Aug 28

ahatanak added a comment to D36915: [Sema] Diagnose local variables and parameters captured by lambda and block expressions in a default argument.

clang currently rejects "void foo(int = a);" and so does gcc.

Mon, Aug 28, 1:47 PM
ahatanak added a comment to D36915: [Sema] Diagnose local variables and parameters captured by lambda and block expressions in a default argument.

I don't think this approach is entirely correct for at least the following reasons:

  1. in the lambda case the machinery that diagnoses capture failures should be the machinery erroring on the lambda (when the parameter is odr-used)
Mon, Aug 28, 11:14 AM

Aug 24 2017

ahatanak added a comment to D36915: [Sema] Diagnose local variables and parameters captured by lambda and block expressions in a default argument.

I don't think this approach is entirely correct for at least the following reasons:

  1. in the lambda case the machinery that diagnoses capture failures should be the machinery erroring on the lambda (when the parameter is odr-used)
  2. in the unevaluated case, once you disable the error, the instantiation machinery will fail to find the corresponding instantiated parmvardecl.
Aug 24 2017, 8:51 AM

Aug 21 2017

ahatanak committed rL311397: [Driver][Darwin] Do not pass -munwind-table if -fno-excpetions is.
[Driver][Darwin] Do not pass -munwind-table if -fno-excpetions is
Aug 21 2017, 3:48 PM

Aug 18 2017

ahatanak updated the diff for D36918: [Sema] Take into account the current context when checking the accessibility of a member function pointer.

Test access to protected member functions.

Aug 18 2017, 10:52 PM
ahatanak created D36918: [Sema] Take into account the current context when checking the accessibility of a member function pointer.
Aug 18 2017, 10:28 PM
ahatanak created D36915: [Sema] Diagnose local variables and parameters captured by lambda and block expressions in a default argument.
Aug 18 2017, 7:25 PM

Aug 10 2017

ahatanak committed rL310672: [Sema][ObjC] Fix spurious -Wcast-qual warnings..
[Sema][ObjC] Fix spurious -Wcast-qual warnings.
Aug 10 2017, 5:07 PM
ahatanak added inline comments to D32210: [Sema][ObjC] Add support for attribute "noescape".
Aug 10 2017, 11:48 AM
ahatanak updated the diff for D32210: [Sema][ObjC] Add support for attribute "noescape".

Address review comments.

Aug 10 2017, 11:47 AM

Aug 4 2017

ahatanak added inline comments to D32210: [Sema][ObjC] Add support for attribute "noescape".
Aug 4 2017, 1:42 PM
ahatanak updated the diff for D32210: [Sema][ObjC] Add support for attribute "noescape".

Include noescape attribute information in the function prototype and modify the AST printer and name mangling accordingly.

Aug 4 2017, 1:41 PM

Aug 3 2017

ahatanak committed rL310006: [Driver][Darwin] Pass -munwind-table when !UseSjLjExceptions..
[Driver][Darwin] Pass -munwind-table when !UseSjLjExceptions.
Aug 3 2017, 4:56 PM
ahatanak closed D35693: [Driver][Darwin] Pass -munwind-table when !UseSjLjExceptions by committing rL310006: [Driver][Darwin] Pass -munwind-table when !UseSjLjExceptions..
Aug 3 2017, 4:56 PM

Jul 31 2017

ahatanak committed rL309640: Use -target instead of -arch in test case..
Use -target instead of -arch in test case.
Jul 31 2017, 4:12 PM
ahatanak committed rL309636: Silence warning -Wmissing-sysroot..
Silence warning -Wmissing-sysroot.
Jul 31 2017, 3:46 PM
ahatanak committed rL309633: [Driver] Make sure the deployment target is earlier than iOS 11 when.
[Driver] Make sure the deployment target is earlier than iOS 11 when
Jul 31 2017, 3:20 PM
ahatanak committed rL309607: [Driver] Allow users to silence the warning that is issued when the.
[Driver] Allow users to silence the warning that is issued when the
Jul 31 2017, 12:17 PM

Jul 28 2017

ahatanak added a comment to D35693: [Driver][Darwin] Pass -munwind-table when !UseSjLjExceptions.

Does the ARM64 ABI call for unwind tables to be emitted for all functions, like the x86-64 ABI does?

Anyway, it seems pretty unfortunate that the default behavior breaks exceptions.

Jul 28 2017, 4:17 PM

Jul 27 2017

ahatanak committed rL309352: Update comment in test case after r309308..
Update comment in test case after r309308.
Jul 27 2017, 6:59 PM
ahatanak committed rL309308: Revert r264998 and r265035..
Revert r264998 and r265035.
Jul 27 2017, 11:53 AM

Jul 24 2017

ahatanak updated the diff for D32210: [Sema][ObjC] Add support for attribute "noescape".

Address review comments.

Jul 24 2017, 4:36 PM
ahatanak added a comment to D32210: [Sema][ObjC] Add support for attribute "noescape".

Address review comments.

  • Allow attaching "noescape" to pointers other than block pointers. Update the docs accordingly.
  • Attach attribute "nocapture" to parameters that are annotated with "noescape".
  • Call Sema::isValidPointerAttrType to determine whether "noescape" can be applied to a parameter. Also, use the existing warning "warn_attribute_pointers_only" rather than defining a new warning that will be used just for noescape.

    I also thought about what else we can do in the front-end when a parameter has 'noescape". One idea is to do something similar to what r301667 did and omit emitting retains and releases of block captures when the block is passed to a function taking a noescape parameter. If that is viable, I can look into it after committing this patch.

Hmm. Unfortunately, I'm not sure that's valid. The retains and releases of block captures don't protect against anything related to escaping the block; they protect against the original variables being modified during the lifetime of the block. It is true that a block literal passed to a noescape parameter has a shorter effective lifetime — we know for certain that it will be unused after the call, and ARC only promises that a value in an imprecise-lifetime strong variable like a block capture will be valid until the last load of that value from the variable. But that duration is still long enough for someone to modify the original variable in a way that is properly sequenced after the formation of the block.

Now, if you could prove that the variable was not modified for the duration of the call, that would be sufficient. And that would be easy to do in the common case by just proving that the address of the variable never escapes. Unfortunately, we don't have that information readily available because Sema doesn't collect it.

Jul 24 2017, 4:25 PM

Jul 20 2017

ahatanak created D35693: [Driver][Darwin] Pass -munwind-table when !UseSjLjExceptions.
Jul 20 2017, 11:43 AM

Jul 19 2017

ahatanak committed rL308498: Add AlignedAllocation.h..
Add AlignedAllocation.h.
Jul 19 2017, 10:27 AM
ahatanak committed rL308496: [Sema] Improve diagnostic message for unavailable C++17 aligned.
[Sema] Improve diagnostic message for unavailable C++17 aligned
Jul 19 2017, 10:19 AM
ahatanak closed D35520: [Sema] Improve diagnostic message for unavailable c++17 aligned allocation functions by committing rL308496: [Sema] Improve diagnostic message for unavailable C++17 aligned.
Jul 19 2017, 10:19 AM

Jul 18 2017

ahatanak updated the diff for D35520: [Sema] Improve diagnostic message for unavailable c++17 aligned allocation functions .

Address review comments.

Jul 18 2017, 11:10 AM

Jul 17 2017

ahatanak created D35520: [Sema] Improve diagnostic message for unavailable c++17 aligned allocation functions .
Jul 17 2017, 5:07 PM

Jul 14 2017

ahatanak updated the diff for D32210: [Sema][ObjC] Add support for attribute "noescape".

Address review comments.

Jul 14 2017, 5:09 PM

Jul 13 2017

ahatanak committed rL307982: [Driver] Respect -target when determining target platform on Apple.
[Driver] Respect -target when determining target platform on Apple
Jul 13 2017, 5:22 PM

Jul 12 2017

ahatanak committed rL307883: [Sema] Mark a virtual CXXMethodDecl as used if a call to it can be.
[Sema] Mark a virtual CXXMethodDecl as used if a call to it can be
Jul 12 2017, 11:09 PM
ahatanak closed D34301: [Sema] Make sure the definition of a referenced virtual function is emitted when it is final by committing rL307883: [Sema] Mark a virtual CXXMethodDecl as used if a call to it can be.
Jul 12 2017, 11:08 PM
ahatanak updated the diff for D34301: [Sema] Make sure the definition of a referenced virtual function is emitted when it is final.

Define and use CXXMethodDecl::getDevirtualizedMethod, which returns the function that is called when a call is devirtualized.

Jul 12 2017, 4:40 PM
ahatanak updated the diff for D34301: [Sema] Make sure the definition of a referenced virtual function is emitted when it is final.

Address review comments.

Jul 12 2017, 12:28 AM
ahatanak added inline comments to D34301: [Sema] Make sure the definition of a referenced virtual function is emitted when it is final.
Jul 12 2017, 12:27 AM

Jul 10 2017

ahatanak committed rL306922: [Driver] Check that the iOS deployment target is iOS 10 or earlier if.
[Driver] Check that the iOS deployment target is iOS 10 or earlier if
Jul 10 2017, 9:42 AM
ahatanak committed rL306722: [Sema] Issue diagnostics if a new/delete expression generates a call to.
[Sema] Issue diagnostics if a new/delete expression generates a call to
Jul 10 2017, 9:42 AM

Jul 5 2017

ahatanak updated subscribers of D34574: [Sema] Disable c++17 aligned new and delete operators if not implemented in the deployment target's c++ standard library.

Does r307218 unbreak the tests?

Jul 5 2017, 6:13 PM
ahatanak added inline comments to D34992: Emit static constexpr member as available_externally definition.
Jul 5 2017, 4:08 PM
ahatanak updated subscribers of D35013: [inline asm] repeating constraint matches the same output.
Jul 5 2017, 11:21 AM
ahatanak added a comment to D35013: [inline asm] repeating constraint matches the same output.

I tried compiling test18 with gcc7.1 (https://godbolt.org) and it fails to compile test18 with "inconsistent operand constraints in an 'asm'". Am I using the same version of the compiler as yours?

Jul 5 2017, 11:15 AM
ahatanak added a comment to D34556: [libcxx] Annotate c++17 aligned new/delete operators with availability attribute.

I'm not exactly sure why the test failed, but the patch was reverted in r306859.

Jul 5 2017, 9:48 AM

Jun 30 2017

ahatanak committed rL306944: Fix indentation..
Fix indentation.
Jun 30 2017, 9:38 PM
ahatanak closed D34529: [Driver] Check that the iOS deployment target is iOS 10 or earlier if the target is 32-bit by committing rL306922: [Driver] Check that the iOS deployment target is iOS 10 or earlier if.
Jun 30 2017, 5:58 PM
ahatanak updated the diff for D34529: [Driver] Check that the iOS deployment target is iOS 10 or earlier if the target is 32-bit.

Set Micro to 99 too.

Jun 30 2017, 4:33 PM
ahatanak updated the diff for D34529: [Driver] Check that the iOS deployment target is iOS 10 or earlier if the target is 32-bit.

Address review comments.

Jun 30 2017, 12:22 PM
ahatanak committed rL306859: Revert "[libcxx] Annotate c++17 aligned new/delete operators with availability".
Revert "[libcxx] Annotate c++17 aligned new/delete operators with availability"
Jun 30 2017, 11:51 AM

Jun 29 2017

ahatanak committed rL306739: Insert llvm_unreachable at the end of a function to silence gcc's.
Insert llvm_unreachable at the end of a function to silence gcc's
Jun 29 2017, 1:44 PM
ahatanak closed D34574: [Sema] Disable c++17 aligned new and delete operators if not implemented in the deployment target's c++ standard library by committing rL306722: [Sema] Issue diagnostics if a new/delete expression generates a call to.
Jun 29 2017, 11:49 AM

Jun 28 2017

ahatanak added a comment to D34574: [Sema] Disable c++17 aligned new and delete operators if not implemented in the deployment target's c++ standard library.

I'll revert the changes I made to libc++ that annotates the allocation functions with availability later.

Jun 28 2017, 7:25 PM
ahatanak updated the diff for D34574: [Sema] Disable c++17 aligned new and delete operators if not implemented in the deployment target's c++ standard library.

The updated patch produces diagnostics if an aligned allocation function is selected that is not implemented in the c++ standard library of the deployment target (except when the function is defined by the user and its definition is available).

Jun 28 2017, 7:21 PM

Jun 27 2017

ahatanak committed rL306494: [CodeGen] Fix assertion failure in EmitCallArg..
[CodeGen] Fix assertion failure in EmitCallArg.
Jun 27 2017, 5:43 PM
ahatanak closed D34665: [CodeGen] Fix assertion failure in EmitCallArg by committing rL306494: [CodeGen] Fix assertion failure in EmitCallArg..
Jun 27 2017, 5:43 PM

Jun 26 2017

ahatanak created D34665: [CodeGen] Fix assertion failure in EmitCallArg.
Jun 26 2017, 10:02 PM
ahatanak committed rL306364: [CodeGen][ObjC] Fix GNU's encoding of bit-field ivars..
[CodeGen][ObjC] Fix GNU's encoding of bit-field ivars.
Jun 26 2017, 9:34 PM
ahatanak added a comment to D34574: [Sema] Disable c++17 aligned new and delete operators if not implemented in the deployment target's c++ standard library.

Duncan and I had a discussion on this.

Jun 26 2017, 1:53 PM
ahatanak committed rL306317: [Sema] Fix a crash-on-invalid when a template parameter list has a class.
[Sema] Fix a crash-on-invalid when a template parameter list has a class
Jun 26 2017, 11:46 AM
ahatanak closed D33606: [Sema] Fix a crash-on-invalid when a template parameter list has a class definition or non-reference class type by committing rL306317: [Sema] Fix a crash-on-invalid when a template parameter list has a class.
Jun 26 2017, 11:46 AM
ahatanak committed rL306310: [libcxx] Annotate c++17 aligned new/delete operators with availability.
[libcxx] Annotate c++17 aligned new/delete operators with availability
Jun 26 2017, 10:40 AM
ahatanak closed D34556: [libcxx] Annotate c++17 aligned new/delete operators with availability attribute by committing rL306310: [libcxx] Annotate c++17 aligned new/delete operators with availability.
Jun 26 2017, 10:40 AM
ahatanak accepted D34496: [clang] Fix printf check for CFIndex.

This looks correct to me. The commit log of the original commit (r163266) doesn't say that CFIndex has been dropped intentionally, so this should be fine.

Jun 26 2017, 12:09 AM

Jun 25 2017

ahatanak updated the diff for D34556: [libcxx] Annotate c++17 aligned new/delete operators with availability attribute.

Fix line number and remove #else.

Jun 25 2017, 6:26 PM
ahatanak updated subscribers of D34574: [Sema] Disable c++17 aligned new and delete operators if not implemented in the deployment target's c++ standard library.
Jun 25 2017, 5:46 PM
ahatanak added a comment to D34574: [Sema] Disable c++17 aligned new and delete operators if not implemented in the deployment target's c++ standard library.

I suppose it's possible to define a new driver option that can be used to tell clang to annotate the implicit declarations with an availability attribute, which will enable the link time error to be caught at compile time. Alternatively, it's also possible to put the availability attributes by default and use the driver option to remove the attributes, but this will cause clang to error out on a valid code when the users have provided their own implementations of the aligned operators.

Jun 25 2017, 5:45 PM
ahatanak added inline comments to D34556: [libcxx] Annotate c++17 aligned new/delete operators with availability attribute.
Jun 25 2017, 5:01 PM