[PATCH] D12155: ARM: Error out on apple darwin platforms if float-abi is hard

2015-08-19 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added a subscriber: cfe-commits. Herald added subscribers: rengolin, aemerson. Error out if user provides -mfloat-abi=hard or -mhard-float on the command line since hard float abi isn't supported on apple platforms (except for non-darwin platforms).

Re: [PATCH] D11815: Pass subtarget feature force-align-stack

2015-08-19 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 32592. ahatanak added a comment. This patch makes changes to record function attribute force-align-stack instead of recording it as a subtarget feature. http://reviews.llvm.org/D11815 Files: include/clang/Driver/CC1Options.td

Re: [PATCH] D11815: Pass subtarget feature force-align-stack

2015-08-17 Thread Akira Hatanaka via cfe-commits
On Thu, Aug 13, 2015 at 5:56 PM, Eric Christopher echri...@gmail.com wrote: Apologies, I'm really resistant to more things being used in TargetOptions and I was (perhaps mistakenly) under the impression that you wanted to move it to TargetOptions without an IR serialization. We need all

Re: [PATCH] D11815: Pass subtarget feature force-align-stack

2015-08-17 Thread Akira Hatanaka via cfe-commits
On Mon, Aug 17, 2015 at 12:41 PM, Eric Christopher echri...@gmail.com wrote: On Mon, Aug 17, 2015 at 11:57 AM Akira Hatanaka ahata...@gmail.com wrote: On Thu, Aug 13, 2015 at 5:56 PM, Eric Christopher echri...@gmail.com wrote: Apologies, I'm really resistant to more things being used

[PATCH] D11815: Pass subtarget feature force-align-stack

2015-08-06 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added reviewers: echristo, dexonsmith. ahatanak added a subscriber: cfe-commits. This patch makes changes to pass subtarget feature force-align-stack instead of passing a backend-option when users provide -mstackrealign on the command line. The

Re: [PATCH] D11815: Pass subtarget feature force-align-stack

2015-08-13 Thread Akira Hatanaka via cfe-commits
Perhaps the comments I left weren't very clear, but the plan was to add a subtarget feature to all targets for now and remove it later when we add support for generic subtarget features, which I believe will be something that will belong to TargetSubtargetInfo (Eric has probably spent more time

Re: [PATCH] D12155: ARM: Error out on apple darwin platforms if float-abi is hard

2015-08-24 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL245866: [ARM] Error out on apple darwin platforms if float-abi is hard. (authored by ahatanak). Changed prior to commit: http://reviews.llvm.org/D12155?vs=32561id=32989#toc Repository: rL LLVM

r245866 - [ARM] Error out on apple darwin platforms if float-abi is hard.

2015-08-24 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Aug 24 14:50:35 2015 New Revision: 245866 URL: http://llvm.org/viewvc/llvm-project?rev=245866view=rev Log: [ARM] Error out on apple darwin platforms if float-abi is hard. Error out if the user tries to use float-abi=hard since it isn't supported on darwin platforms.

r245871 - Revert r245866.

2015-08-24 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Aug 24 15:30:57 2015 New Revision: 245871 URL: http://llvm.org/viewvc/llvm-project?rev=245871view=rev Log: Revert r245866. This commit was causing buildbot failures. Removed: cfe/trunk/test/Driver/arm-float-abi.c Modified: cfe/trunk/lib/Driver/Tools.cpp

Re: [PATCH] D12922: Add support for function attribute "notail"

2015-10-26 Thread Akira Hatanaka via cfe-commits
ping On Mon, Oct 19, 2015 at 5:59 PM, Akira Hatanaka wrote: > ahatanak updated this revision to Diff 37816. > ahatanak added a comment. > > Address review comments: > > 1. Renamed the attribute to "not_tail_called". > > I chose "not_tail_called" over "notailcall" or "notail"

Re: [PATCH] D13928: [CodeGen] Attach function attributes to Objective-c and OpenMP functions.

2015-10-27 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. I'm taking incremental steps here, but I agree that we should refactor this in a better way later. http://reviews.llvm.org/D13928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r251476 - [CodeGen] Attach function attributes to Objective-C and OpenMP

2015-10-27 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Oct 27 21:30:47 2015 New Revision: 251476 URL: http://llvm.org/viewvc/llvm-project?rev=251476=rev Log: [CodeGen] Attach function attributes to Objective-C and OpenMP functions. This commit fixes a bug in CGOpenMPRuntime.cpp and CGObjC.cpp where some of the function

r251477 - Add a test case for r251476.

2015-10-27 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Oct 27 21:32:19 2015 New Revision: 251477 URL: http://llvm.org/viewvc/llvm-project?rev=251477=rev Log: Add a test case for r251476. Added: cfe/trunk/test/OpenMP/function-attr.cpp Added: cfe/trunk/test/OpenMP/function-attr.cpp URL:

Re: [PATCH] D13928: [CodeGen] Attach function attributes to Objective-c and OpenMP functions.

2015-10-27 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL251476: [CodeGen] Attach function attributes to Objective-C and OpenMP (authored by ahatanak). Changed prior to commit: http://reviews.llvm.org/D13928?vs=37967=38619#toc Repository: rL LLVM

Re: [PATCH] D13610: [CodeGen] Fix CodeGenModule::CreateGlobalInitOrDestructFunction

2015-10-21 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. The patch isn't fixing any serious bugs, but is fixing what seems to me inconsistencies in the code. It makes the following changes: 1. Currently, SetLLVMFunctionAttributes is called to add function attributes to the internal function definitions, but

Re: [PATCH] D14471: [AArch64] Fix a crash in driver

2015-11-10 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. I think I understand some of your concerns, but I'm not sure I fully understand what you are suggesting. I think I can use macro __aarch64__ to have getAArch64TargetCPU return "native" when the compiler is not run on an AArch64 platform, but it doesn't sound like

Re: [PATCH] D12547: Add support for function attribute "disable_tail_calls"

2015-11-11 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Marking virtual functions as disable_tail_calls is fine since disable_tail_calls affects the call sites inside the body of the marked function. In your example, it prevents tail call optimization on call sites inside B::g, but doesn't affect call sites in D::g.

Re: [PATCH] D12547: Add support for function attribute "disable_tail_calls"

2015-11-09 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 39702. ahatanak added a comment. I ended up making a few more changes based on the feedback on the not_tail_called attribute: - Changed wording in docs and added a code example. - Made changes to detect both (naked,disable_tail_calls) and

Re: [PATCH] D14471: [AArch64] Fix a crash in driver

2015-11-09 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Hi Renato In http://reviews.llvm.org/D14471#285138, @rengolin wrote: > I'm uncomfortable with this change, since it introduces a dependency between > the two calls, and that's fragile. Also, the nullptr fiddling is not a good > design overall. > > If there is a

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-11 Thread Akira Hatanaka via cfe-commits
Currently, we inline a function only if the call to isInlineViable returns true, which means there are cases where we don't inline functions marked always_inline. Is there a reason we haven't made changes to produce any diagnostic in those cases? The comment also says "should be inlined whenever

Re: [PATCH] D12547: Add support for function attribute "disable_tail_calls"

2015-11-11 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 40011. ahatanak added a comment. Address review comments. http://reviews.llvm.org/D12547 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td lib/CodeGen/CGCall.cpp lib/Sema/SemaDeclAttr.cpp test/CodeGen/attr-disable-tail-calls.c

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-11 Thread Akira Hatanaka via cfe-commits
I think you are suggesting we change the inliner to produce a diagnostic (error or warning?) when the callee is marked always_inline and its function attributes are not compatible with the caller's (functionsHaveCompatibleAttributes returns false). Is that correct? On Wed, Nov 11, 2015 at 4:48

Re: [PATCH] D12547: Add support for function attribute "disable_tail_calls"

2015-11-12 Thread Akira Hatanaka via cfe-commits
ahatanak marked an inline comment as done. ahatanak added a comment. I'll commit this patch shortly. Thank you for the review. http://reviews.llvm.org/D12547 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D14471: [AArch64] Fix a crash in driver

2015-11-12 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. > If you can get the CPU name, return it. If not, return "native". If you're on > AArch64 and you can't get the CPU name, that's a bug that needs fixing. If > it's always "generic", that's another piece of code that needs fixing. If > whatever getCPU function you use

Re: [PATCH] D14471: [AArch64] Fix a crash in driver

2015-11-11 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. In http://reviews.llvm.org/D14471#287412, @rengolin wrote: > In http://reviews.llvm.org/D14471#286380, @ahatanak wrote: > > > I think I can use macro __aarch64__ to have getAArch64TargetCPU return > > "native" when the compiler is not run on an AArch64 platform, but it

Re: [PATCH] D14471: [AArch64] Fix a crash in driver

2015-11-11 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Sorry, there were mistakes in my comments. What I meant to say is that changing getAArch64TargetCPU to return "native" would break the case where clang is being run on an aarch64 host. The current code in trunk will get the host cpu name (which I believe is currently

Re: [PATCH] D12547: Add support for function attribute "disable_tail_calls"

2015-11-12 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 40060. ahatanak marked 2 inline comments as done. ahatanak added a comment. Added "expected-no-diagnostics" to test case. http://reviews.llvm.org/D12547 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td lib/CodeGen/CGCall.cpp

r252912 - Add support for driver option -mno-ms-bitfields.

2015-11-12 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Nov 12 11:21:22 2015 New Revision: 252912 URL: http://llvm.org/viewvc/llvm-project?rev=252912=rev Log: Add support for driver option -mno-ms-bitfields. This option is used to cancel -mms-bitfields on the command line. rdar://problem/15898553 Added:

Re: [PATCH] D13834: Produce a better diagnostic for global register variables

2015-11-09 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 39774. ahatanak added a comment. Added comments to clarify what the code is doing. http://reviews.llvm.org/D13834 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Basic/TargetInfo.h lib/Basic/Targets.cpp lib/Sema/SemaDecl.cpp

Re: [PATCH] D12922: Add support for function attribute "notail"

2015-11-02 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaDecl.cpp:5374 @@ +5373,3 @@ + + // Virtual functions cannot be marked as 'notail'. + if (auto *Attr = ND.getAttr()) aaron.ballman wrote: > I am not home yet, and so I don't have the source code to try

Re: [PATCH] D12922: Add support for function attribute "notail"

2015-11-02 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 38967. ahatanak added a comment. Fixed test cases: - Added a test case for the attribute being specified on a variable. - Added a missing 's' to "virtual function" in the check strings. http://reviews.llvm.org/D12922 Files: include/clang/Basic/Attr.td

Re: [PATCH] D12922: Add support for function attribute "notail"

2015-11-02 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: test/Sema/attr-notail.c:9 @@ +8,3 @@ +} + +int g0 __attribute__((not_tail_called)); // expected-warning {{'not_tail_called' attribute only applies to functions}} I didn't understand what kind of test case is required

Re: [PATCH] D13610: [CodeGen] Fix CodeGenModule::CreateGlobalInitOrDestructFunction

2015-10-30 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL251734: [CodeGen] Call SetInternalFunctionAttributes to attach function (authored by ahatanak). Changed prior to commit: http://reviews.llvm.org/D13610?vs=37001=38835#toc Repository: rL LLVM

r251734 - [CodeGen] Call SetInternalFunctionAttributes to attach function

2015-10-30 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Oct 30 20:28:07 2015 New Revision: 251734 URL: http://llvm.org/viewvc/llvm-project?rev=251734=rev Log: [CodeGen] Call SetInternalFunctionAttributes to attach function attributes to internal functions. This patch fixes CodeGenModule::CreateGlobalInitOrDestructFunction

Re: [PATCH] D12922: Add support for function attribute "notail"

2015-11-01 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaDecl.cpp:5374 @@ +5373,3 @@ + + // Virtual functions cannot be marked as 'notail'. + if (auto *Attr = ND.getAttr()) aaron.ballman wrote: > Is there a reason this is here instead of SemaDeclAttr.cpp? It

Re: [PATCH] D12922: Add support for function attribute "notail"

2015-11-04 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Thanks, I'll see how the review for the llvm-side patch goes and commit both patches after it is approved. http://reviews.llvm.org/D12922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D13834: Produce a better diagnostic for global register variables

2015-11-04 Thread Akira Hatanaka via cfe-commits
ping On Fri, Oct 16, 2015 at 2:51 PM, Akira Hatanaka wrote: > ahatanak created this revision. > ahatanak added a subscriber: cfe-commits. > > clang doesn't print a very user-friendly message when an invalid register > is used for a global register variable: > > For example,

Re: [PATCH] D12922: Add support for function attribute "notail"

2015-11-06 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL252369: Add support for function attribute 'not_tail_called'. (authored by ahatanak). Changed prior to commit: http://reviews.llvm.org/D12922?vs=39003=39607#toc Repository: rL LLVM

r252369 - Add support for function attribute 'not_tail_called'.

2015-11-06 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Nov 6 17:56:15 2015 New Revision: 252369 URL: http://llvm.org/viewvc/llvm-project?rev=252369=rev Log: Add support for function attribute 'not_tail_called'. This attribute is used to prevent tail-call optimizations to the marked function. For example, in the following

r252376 - Use regex in test case.

2015-11-06 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Nov 6 18:48:18 2015 New Revision: 252376 URL: http://llvm.org/viewvc/llvm-project?rev=252376=rev Log: Use regex in test case. This is a follow-up to r252369. Modified: cfe/trunk/test/CodeGen/attr-no-tail.c Modified: cfe/trunk/test/CodeGen/attr-no-tail.c URL:

Re: [PATCH] D14471: [AArch64] Fix a crash in driver

2015-11-06 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Send the patch to cfe-commits. http://reviews.llvm.org/D14471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12922: Add support for function attribute "notail"

2015-11-02 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 39003. ahatanak added a comment. Added test case that produces an error diagnostic if an argument is passed for not_tail_called. http://reviews.llvm.org/D12922 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td

[PATCH] D13834: Produce a better diagnostic for global register variables

2015-10-16 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added a subscriber: cfe-commits. clang doesn't print a very user-friendly message when an invalid register is used for a global register variable: For example, when the following code is compiled, $ cat f1.c volatile register long long A asm ("rdi");

Re: [PATCH] D13525: [CodeGen] Attach function attributes to functions created in CGBlocks.cpp.

2015-10-07 Thread Akira Hatanaka via cfe-commits
On Wed, Oct 7, 2015 at 1:48 PM, Duncan P. N. Exon Smith < dexonsm...@apple.com> wrote: > > > On 2015-Oct-07, at 11:35, Akira Hatanaka wrote: > > > > ahatanak created this revision. > > ahatanak added reviewers: dexonsmith, echristo. > > ahatanak added a subscriber:

Re: [PATCH] D12922: Add support for function attribute "notail"

2015-10-19 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 37816. ahatanak added a comment. Address review comments: 1. Renamed the attribute to "not_tail_called". I chose "not_tail_called" over "notailcall" or "notail" to better distinguish it from the attribute that is proposed in http://reviews.llvm.org/D12547

Re: [PATCH] D12922: Add support for function attribute "notail"

2015-10-14 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 37437. ahatanak added a comment. Address some of the review comments: - Added a c++ test which tests the c++ spelling of the attribute on member functions and shows which virtual functions calls get marked as "notail" in the IR. - Added a check that was

Re: [PATCH] D12922: Add support for function attribute "notail"

2015-10-14 Thread Akira Hatanaka via cfe-commits
ahatanak marked an inline comment as done. Comment at: include/clang/Basic/AttrDocs.td:1619 @@ +1618,3 @@ + let Content = [{ +Tail call optimization is not performed on direct calls to a function marked ``notail``. + }]; Perhaps direct call isn't the right

[PATCH] D13928: [CodeGen] Attach function attributes to Objective-c and OpenMP functions.

2015-10-20 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added reviewers: dexonsmith, echristo. ahatanak added a subscriber: cfe-commits. Another patch which fixes a bug in clang where it creates a function but doesn't attach function attributes to it. http://reviews.llvm.org/D13928 Files:

Re: [PATCH] D13525: [CodeGen] Attach function attributes to functions created in CGBlocks.cpp.

2015-10-08 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL249735: [CodeGen] [CodeGen] Attach function attributes to functions created in (authored by ahatanak). Changed prior to commit: http://reviews.llvm.org/D13525?vs=36886=36891#toc Repository: rL LLVM

[PATCH] D13525: [CodeGen] Attach function attributes to functions created in CGBlocks.cpp.

2015-10-07 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added reviewers: dexonsmith, echristo. ahatanak added a subscriber: cfe-commits. This patch makes changes to attach function attributes to the following functions created in CGBlocks.cpp: __copy_helper_block_ __destroy_helper_block_

Re: [PATCH] D12922: Add support for function attribute "notail"

2015-10-12 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 37172. ahatanak added a comment. I've made some changes following the discussion I had and the feedback I got on the llvm-side patch. This is the link to the discussion thread: http://thread.gmane.org/gmane.comp.compilers.llvm.cvs/271105/ The difference

Re: [PATCH] D13610: [CodeGen] Fix CodeGenModule::CreateGlobalInitOrDestructFunction

2015-10-09 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Add a comment to send this patch to cfe-commits. http://reviews.llvm.org/D13610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r249722 - [CodeGen] Check if the Decl pointer passed is null, and if so, return

2015-10-08 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Oct 8 14:30:57 2015 New Revision: 249722 URL: http://llvm.org/viewvc/llvm-project?rev=249722=rev Log: [CodeGen] Check if the Decl pointer passed is null, and if so, return early. This is needed in a patch I plan to commit later, in which a null Decl pointer is passed

Re: [PATCH] D13834: Produce a better diagnostic for global register variables

2015-11-17 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Thanks, I'll commit this patch shortly. If it makes the code cleaner, I can define enums in TargetInfo and change validateGlobalRegisterVariable to return one of them in a follow-up patch. http://reviews.llvm.org/D13834

Re: [PATCH] D13834: Produce a better diagnostic for global register variables

2015-11-17 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL253405: Produce a better diagnostic for global register variables. (authored by ahatanak). Changed prior to commit: http://reviews.llvm.org/D13834?vs=39774=40451#toc Repository: rL LLVM

r253405 - Produce a better diagnostic for global register variables.

2015-11-17 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Nov 17 18:15:28 2015 New Revision: 253405 URL: http://llvm.org/viewvc/llvm-project?rev=253405=rev Log: Produce a better diagnostic for global register variables. Currently, when there is a global register variable in a program that is bound to an invalid register,

Re: [PATCH] D12344: ARM: Error out if float-ab=hard and abi=apcs-gnu on macho platforms

2015-08-26 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. float-abi=hard has no effect on the backend code-generation if the ABI is APCS, meaning GPRs will be used to pass floating point arguments. This patch makes changes to the driver so that the error is detected in the front-end rather than silently ignoring the option

r246054 - [ARM] Error out if float-ab=hard and abi=apcs-gnu on macho platforms.

2015-08-26 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Aug 26 14:00:11 2015 New Revision: 246054 URL: http://llvm.org/viewvc/llvm-project?rev=246054view=rev Log: [ARM] Error out if float-ab=hard and abi=apcs-gnu on macho platforms. Error out if -mfloat-abi=hard or -mhard-float is specified on the command line and the

Re: [PATCH] D12511: [LTO] Pass -no-zero-initialized-in-bss on linker command line

2015-08-31 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. If it's important to be able to compile one file with -fno-zero-initialized-in-bss and another without the option, we could add a bit to GlobalVariable that indicates it shouldn't be go into the bss section. Is that what you are suggesting? If we are going to take

Re: [PATCH] D11815: Pass subtarget feature "force-align-stack"

2015-08-31 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. In http://reviews.llvm.org/D11815#236368, @vkalintiris wrote: > In http://reviews.llvm.org/D11815#235394, @ahatanak wrote: > > > The cc1 option "-mstackrealign" now means "force stack realignment" rather > > than "allow stack realignment" and causes function attribute

[PATCH] D12511: [LTO] Pass -no-zero-initialized-in-bss on linker command line

2015-08-31 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added reviewers: echristo, dexonsmith. ahatanak added a subscriber: cfe-commits. Clang driver option -fno-zero-initialized-in-bss is used to prevent global variables that are initialized to zero from being placed in the bss section, but is currently

Re: [PATCH] D11815: Pass subtarget feature "force-align-stack"

2015-09-01 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. In http://reviews.llvm.org/D11815#236368, @vkalintiris wrote: > In http://reviews.llvm.org/D11815#235394, @ahatanak wrote: > > > > > For example, on a Mips target, where the O32 ABI requires either way an > 8-byte alignment, we would generate redundant code for

[PATCH] D12547: Add support for function attribute "disable_tail_calls"

2015-09-01 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added a subscriber: cfe-commits. There have been requests for a function attribute that disables tail call optimizations in the backend. This patch defines such an attribute. http://reviews.llvm.org/D12547 Files: include/clang/Basic/Attr.td

Re: [PATCH] D11815: Pass subtarget feature "force-align-stack"

2015-09-08 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. In http://reviews.llvm.org/D11815#238209, @vkalintiris wrote: > In http://reviews.llvm.org/D11815#237541, @ahatanak wrote: > > > In http://reviews.llvm.org/D11815#236368, @vkalintiris wrote: > > > > > In http://reviews.llvm.org/D11815#235394, @ahatanak wrote: > > > > >

Re: [PATCH] D12547: Add support for function attribute "disable_tail_calls"

2015-09-02 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 33882. http://reviews.llvm.org/D12547 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td lib/CodeGen/CGCall.cpp lib/Sema/SemaDeclAttr.cpp test/CodeGen/attr-disable-tail-calls.c Index: test/CodeGen/attr-disable-tail-calls.c

[PATCH] D12344: ARM: Error out if float-ab=hard and abi=apcs-gnu on macho platforms

2015-08-25 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: vsk. ahatanak added a subscriber: cfe-commits. Herald added subscribers: rengolin, aemerson. This patch corrects http://reviews.llvm.org/D12155, which didn't take into account the fact that aapcs ABI can be selected on darwin platforms.

Re: [PATCH] D10414: Attach function attribute "arm-restrict-it" instead of passing arm-restrict-it as a backend-option

2015-09-09 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 34379. ahatanak added a comment. Based on the feedback from reviewers for the llvm patch (http://reviews.llvm.org/D10416), I made changes to fix the handling of -mrestrict-it and -mno-restrict-it in the driver. The driver now passes subtarget feature

Re: [PATCH] D12547: Add support for function attribute "disable_tail_calls"

2015-09-15 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: include/clang/Basic/Attr.td:894 @@ -893,1 +893,3 @@ +def DisableTailCalls : InheritableAttr { + let Spellings = [GNU<"disable_tail_calls">, aaron.ballman wrote: > Pardon me if this is obvious, but -- are there times

Re: [PATCH] D12547: Add support for function attribute "disable_tail_calls"

2015-09-15 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 34872. ahatanak added a comment. Sorry for the delay in my response. I had discussions with the users who requested this feature and it turns out they were asking for two different kinds of attributes. They are both needed to disable tail call

r247451 - Record function attribute "stackrealign" instead of using backend option

2015-09-11 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Sep 11 13:55:09 2015 New Revision: 247451 URL: http://llvm.org/viewvc/llvm-project?rev=247451=rev Log: Record function attribute "stackrealign" instead of using backend option -force-align-stack. Also, make changes to the driver so that -mno-stack-realign is no longer

Re: [PATCH] D11815: Pass subtarget feature "force-align-stack"

2015-09-11 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL247451: Record function attribute "stackrealign" instead of using backend option (authored by ahatanak). Changed prior to commit: http://reviews.llvm.org/D11815?vs=33456=34569#toc Repository: rL

Re: [PATCH] D12547: Add support for function attribute "disable_tail_calls"

2015-09-16 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 34919. ahatanak added a comment. Made the following changes to address review comments: - Use checkAttrMutualExclusion. - Removed spaces in the check strings in test case attr-disable-tail-calls.c. http://reviews.llvm.org/D12547 Files:

Re: [PATCH] D12547: Add support for function attribute "disable_tail_calls"

2015-09-16 Thread Akira Hatanaka via cfe-commits
On Wed, Sep 16, 2015 at 8:05 AM, Aaron Ballman wrote: > On Wed, Sep 16, 2015 at 12:47 AM, Akira Hatanaka > wrote: > > ahatanak added inline comments. > > > > > > Comment at: include/clang/Basic/Attr.td:894 > > @@ -893,1 +893,3 @@ > >

Re: [PATCH] D12922: Add support for function attribute "notail"

2015-09-16 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. The llvm-side patch is here: http://reviews.llvm.org/D12923 http://reviews.llvm.org/D12922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D12922: Add support for function attribute "notail"

2015-09-16 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: aaron.ballman. ahatanak added a subscriber: cfe-commits. This patch adds support for a new function attribute "notail". The attribute is used to disable tail call optimization on calls to functions marked with the attribute. This is

Re: [PATCH] D11815: Pass subtarget feature "force-align-stack"

2015-09-10 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. OK, thanks. I'll go ahead and commit this patch and the llvm-side patch. http://reviews.llvm.org/D11815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D11815: Pass subtarget feature "force-align-stack"

2015-09-09 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Hal, do you have any thoughts on the points Vasileios brought up? Currently, many of the targets don't guarantee that the realigned stack is at least as aligned as the default alignment required by the ABI. Is this the behavior end-users expect when they use

Re: [PATCH] D13004: Create a new attribute set when the definition is parsed after a declaration of a function

2015-09-21 Thread Akira Hatanaka via cfe-commits
On Mon, Sep 21, 2015 at 11:03 AM, Duncan P. N. Exon Smith < dexonsm...@apple.com> wrote: > > > On 2015-Sep-21, at 01:42, Akira Hatanaka via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > > > > ahatanak created this revision. > > ahatanak added a

r248191 - Remove attributes minsize and optsize, which conflict with optnone.

2015-09-21 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Sep 21 13:52:24 2015 New Revision: 248191 URL: http://llvm.org/viewvc/llvm-project?rev=248191=rev Log: Remove attributes minsize and optsize, which conflict with optnone. This commit fixes an assert that is triggered when optnone is being added to an IR function that

Re: [PATCH] D11815: Pass subtarget feature force-align-stack

2015-08-28 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: lib/Driver/Tools.cpp:4232 @@ +4231,3 @@ + false)) +CmdArgs.push_back(Args.MakeArgString(-force-align-stack)); + hfinkel wrote: ahatanak wrote: echristo wrote: hfinkel wrote: echristo

Re: [PATCH] D11815: Pass subtarget feature force-align-stack

2015-08-27 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: lib/Driver/Tools.cpp:4232 @@ +4231,3 @@ + false)) +CmdArgs.push_back(Args.MakeArgString(-force-align-stack)); + echristo wrote: hfinkel wrote: echristo wrote: hfinkel wrote: The code

Re: [PATCH] D11815: Pass subtarget feature force-align-stack

2015-08-28 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 33456. ahatanak added a comment. This updated patch changes the handling of driver option -mstackrealign/-mno-stackrealign. -mno-stackrealign no longer indicates stack realignment should be disallowed and clang no longer attaches function attribute

Re: [PATCH] D15463: [Objective-c] Fix a crash

2015-12-15 Thread Akira Hatanaka via cfe-commits
On Tue, Dec 15, 2015 at 12:55 PM, Justin Bogner <m...@justinbogner.com> wrote: > Akira Hatanaka <ahata...@gmail.com> writes: > > On Mon, Dec 14, 2015 at 10:39 AM, Justin Bogner <m...@justinbogner.com> > > wrote: > > > >> Akira Hatanaka via

[PATCH] D15463: [Objective-c] Fix a crash

2015-12-11 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added a subscriber: cfe-commits. This patch fixes a crash that occurs when __kindof is incorrectly used in the type parameter list of an interface. The crash occurs because ObjCTypeParamList::back() is called in checkTypeParamListConsistency on an empty

Re: [PATCH] D15463: [Objective-c] Fix a crash

2015-12-15 Thread Akira Hatanaka via cfe-commits
n Tue, Dec 15, 2015 at 12:55 PM, Justin Bogner <m...@justinbogner.com> > > wrote: > > > >> Akira Hatanaka <ahata...@gmail.com> writes: > >> > On Mon, Dec 14, 2015 at 10:39 AM, Justin Bogner < > m...@justinbogner.com> > >> > wrote: >

Re: [PATCH] D15463: [Objective-c] Fix a crash

2015-12-15 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL255754: [Objective-c] Fix a crash that occurs when ObjCTypeParamList::back() is (authored by ahatanak). Changed prior to commit: http://reviews.llvm.org/D15463?vs=42560=42962#toc Repository: rL LLVM

r255754 - [Objective-c] Fix a crash that occurs when ObjCTypeParamList::back() is

2015-12-15 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Dec 16 00:25:38 2015 New Revision: 255754 URL: http://llvm.org/viewvc/llvm-project?rev=255754=rev Log: [Objective-c] Fix a crash that occurs when ObjCTypeParamList::back() is called on an empty list. This commit makes Parser::parseObjCTypeParamListOrProtocolRefs return

Re: [PATCH] D15097: [Sema] Issue a warning for integer overflow in struct initializer

2016-01-08 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. ping http://reviews.llvm.org/D15097 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D15599: [CodeGen] Fix a crash that occurs when attribute "naked" is attached to a c++ member function

2016-01-07 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. ping http://reviews.llvm.org/D15599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D15097: [Sema] Issue a warning for integer overflow in struct initializer

2015-11-30 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added a subscriber: cfe-commits. Issue a warning if an initializing integer expression overflows. For example, clang should issue a warning when compiling the following code because 4 * 1024 * 1024 * 1024 doesn't fit into a 32-bit integer: struct s {

Re: [PATCH] D15599: [CodeGen] Fix a crash that occurs when attribute "naked" is attached to a c++ member function

2016-01-12 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. In http://reviews.llvm.org/D15599#325113, @hans wrote: > Just out of curiosity, where does this come up in practice? I only have a short test case a user provided so t's not really clear whether it was necessary to mark a member function naked or there were other

Re: r257357 - [Sema] Issue a warning for integer overflow in struct initializer

2016-01-11 Thread Akira Hatanaka via cfe-commits
:01PM -0000, Akira Hatanaka via cfe-commits > wrote: >> Author: ahatanak >> Date: Mon Jan 11 11:22:01 2016 >> New Revision: 257357 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=257357=rev >> Log: >> [Sema] Issue a warning for integer overflow in struct i

Re: [PATCH] D15897: [libc++] Silence warning about padding inserted at the tail of struct _Rep_base

2016-01-13 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Ping. The same pragma is being used in other places (regex.cpp and locale.cpp) to silence the warning. http://reviews.llvm.org/D15897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D21104: [CodeGen][ObjC] Block captures should inherit the type of the captured field in the enclosing lambda or block

2016-06-07 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: rjmccall. ahatanak added a subscriber: cfe-commits. This patch fixes a bug in code-gen where it uses the type of the declared variable rather than the type of the capture of the enclosing lambda or block for the block capture. For

[PATCH] D21187: Allow use of lambda expressions in array bounds

2016-06-09 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added a subscriber: cfe-commits. clang currently errors out when a lambda expression is used to compute the size of an array even though clang supports variable-length arrays as a C99 extension. For example, $ cat vla1.cpp ``` int foo3(); struct S1 {

Re: [PATCH] D20407: [CodeGen][ObjC] zero-ext an i1 value to i8

2016-05-25 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. In http://reviews.llvm.org/D20407#439951, @rjmccall wrote: > The C standard is poorly-written in this area, but I think it would be > reasonable for CheckFunctionReturnType to just silently remove _Atomic. (You > will not be able to just re-use your new method there;

Re: [PATCH] D20407: [CodeGen][ObjC] zero-ext an i1 value to i8

2016-05-25 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 58512. ahatanak added a comment. Rename variables. http://reviews.llvm.org/D20407 Files: include/clang/AST/Type.h lib/AST/Type.cpp lib/CodeGen/CGObjC.cpp lib/Sema/SemaObjCProperty.cpp test/CodeGenObjC/property-atomic-bool.m

Re: [PATCH] D20407: [CodeGen][ObjC] zero-ext an i1 value to i8

2016-05-25 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 58495. ahatanak added a comment. Address John's review comments. http://reviews.llvm.org/D20407 Files: include/clang/AST/Type.h lib/AST/Type.cpp lib/CodeGen/CGObjC.cpp lib/Sema/SemaObjCProperty.cpp test/CodeGenObjC/property-atomic-bool.m

Re: [PATCH] D20407: [CodeGen][ObjC] zero-ext an i1 value to i8

2016-05-25 Thread Akira Hatanaka via cfe-commits
ahatanak marked 7 inline comments as done. Comment at: lib/AST/Type.cpp:1282 @@ -1277,1 +1281,3 @@ +} + Optional Type::getObjCSubstitutions( I added getTypePtr() because the code didn't compile. Comment at: lib/CodeGen/CGObjC.cpp:901

Re: [PATCH] D20407: [CodeGen][ObjC] zero-ext an i1 value to i8

2016-05-25 Thread Akira Hatanaka via cfe-commits
ahatanak marked 2 inline comments as done. ahatanak added a comment. I reverted the changes I made in SemaDeclObjC.cpp as they weren't needed to pass the regression tests I added. clang still asserts when it compiles an objective-c method returning _Atomic and those changes will become

  1   2   3   4   5   6   >