[PATCH] D26808: [Sema] Don't allow applying address-of operator to a call to a function with __unknown_anytype return type

2016-11-17 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added reviewers: doug.gregor, spyffe. ahatanak added a subscriber: cfe-commits. This patch fixes an assert in CodeGenFunction::EmitCallExprLValue that is triggered when the CallExpr's return type is not a reference type: assert(E->getCallReturnType(getCon

[PATCH] D21099: [Sema] Teach -Wcast-align to look at the aligned attribute of the declared variables

2016-11-17 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 78399. ahatanak added a comment. Address Alex's review comments. Define a static function for setting SrcAlign. https://reviews.llvm.org/D21099 Files: lib/Sema/SemaChecking.cpp test/Sema/warn-cast-align.c Index: test/Sema/warn-cast-align.c =

[PATCH] D21099: [Sema] Teach -Wcast-align to look at the aligned attribute of the declared variables

2016-11-18 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 78594. ahatanak marked 2 inline comments as done. ahatanak added a comment. Make the helper function return the Decl's alignment by value. https://reviews.llvm.org/D21099 Files: lib/Sema/SemaChecking.cpp test/Sema/warn-cast-align.c Index: test/Sema/w

r287410 - [Sema] Don't allow applying address-of operator to a call to a function

2016-11-18 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Nov 18 18:13:03 2016 New Revision: 287410 URL: http://llvm.org/viewvc/llvm-project?rev=287410&view=rev Log: [Sema] Don't allow applying address-of operator to a call to a function with __unknown_anytype return type. When the following code is compiled, Sema infers that

[PATCH] D26808: [Sema] Don't allow applying address-of operator to a call to a function with __unknown_anytype return type

2016-11-18 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL287410: [Sema] Don't allow applying address-of operator to a call to a function (authored by ahatanak). Changed prior to commit: https://reviews.llvm.org/D26808?vs=78396&id=78598#toc Repository: rL L

r288267 - [Sema] Teach -Wcast-align to look at the aligned attribute of the

2016-11-30 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Nov 30 13:42:03 2016 New Revision: 288267 URL: http://llvm.org/viewvc/llvm-project?rev=288267&view=rev Log: [Sema] Teach -Wcast-align to look at the aligned attribute of the declared variables. Teach Sema to check the aligned attribute attached to variable declarations

r288404 - [CodeGen][ARM] Make sure the value and type used to create a bitcast

2016-12-01 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Dec 1 13:25:14 2016 New Revision: 288404 URL: http://llvm.org/viewvc/llvm-project?rev=288404&view=rev Log: [CodeGen][ARM] Make sure the value and type used to create a bitcast have the same size. This fixes an asset that is triggered when an address of a boolean variab

r289615 - [CodeGen][ObjC] Emit objc_unsafeClaimAutoreleasedReturnValue for

2016-12-13 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Dec 13 17:32:22 2016 New Revision: 289615 URL: http://llvm.org/viewvc/llvm-project?rev=289615&view=rev Log: [CodeGen][ObjC] Emit objc_unsafeClaimAutoreleasedReturnValue for fragile runtime too. Follow-up to r258962. rdar://problem/29269006 Modified: cfe/trunk/incl

r300722 - [Sema][ObjC] Disallow jumping into ObjC fast enumeration loops.

2017-04-19 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Apr 19 12:54:08 2017 New Revision: 300722 URL: http://llvm.org/viewvc/llvm-project?rev=300722&view=rev Log: [Sema][ObjC] Disallow jumping into ObjC fast enumeration loops. rdar://problem/31635406 Differential Revision: https://reviews.llvm.org/D32187 Modified: cfe

r301667 - [CodeGen][ObjC] Don't retain captured Objective-C pointers at block

2017-04-28 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Apr 28 13:50:57 2017 New Revision: 301667 URL: http://llvm.org/viewvc/llvm-project?rev=301667&view=rev Log: [CodeGen][ObjC] Don't retain captured Objective-C pointers at block creation that are const-qualified. When a block captures an ObjC object pointer, clang retains

r302495 - [CodeGen][ObjC] Emit @objc_retain at -O0 for variables captured by

2017-05-08 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon May 8 20:20:05 2017 New Revision: 302495 URL: http://llvm.org/viewvc/llvm-project?rev=302495&view=rev Log: [CodeGen][ObjC] Emit @objc_retain at -O0 for variables captured by blocks. r302270 made changes to avoid emitting clang.arc.use at -O0 and instead emit @objc_rele

Re: r302270 - CodeGen: avoid use of @clang.arc.use intrinsic at O0

2017-05-08 Thread Akira Hatanaka via cfe-commits
Thank you for the fix. I committed a follow-up patch in r302495, which makes IRGen emit @objc_retain at -O0. > On May 5, 2017, at 11:39 AM, Saleem Abdulrasool via cfe-commits > wrote: > > Author: compnerd > Date: Fri May 5 13:39:06 2017 > New Revision: 302270 > > URL: http://llvm.org/viewvc/

r302503 - [Sema][ObjC] Clean up possible null dereference.

2017-05-08 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon May 8 20:54:51 2017 New Revision: 302503 URL: http://llvm.org/viewvc/llvm-project?rev=302503&view=rev Log: [Sema][ObjC] Clean up possible null dereference. It appears that the code is actually dead since unbridged-cast placeholder types are created by calling CastOpera

[libcxxabi] r302763 - [libcxxabi] Align unwindHeader on a double-word boundary.

2017-05-10 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu May 11 00:58:52 2017 New Revision: 302763 URL: http://llvm.org/viewvc/llvm-project?rev=302763&view=rev Log: [libcxxabi] Align unwindHeader on a double-word boundary. r276215 made a change to annotate _Unwind_Exception with attribute "aligned" so that an exception object

[libcxxabi] r302764 - Revert "[libcxxabi] Align unwindHeader on a double-word boundary."

2017-05-10 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu May 11 01:17:49 2017 New Revision: 302764 URL: http://llvm.org/viewvc/llvm-project?rev=302764&view=rev Log: Revert "[libcxxabi] Align unwindHeader on a double-word boundary." This reverts commit r302763. The commit caused bot failures. Removed: libcxxabi/trunk/tes

[libcxxabi] r302978 - [libcxxabi] Align unwindHeader on a double-word boundary.

2017-05-12 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri May 12 22:14:49 2017 New Revision: 302978 URL: http://llvm.org/viewvc/llvm-project?rev=302978&view=rev Log: [libcxxabi] Align unwindHeader on a double-word boundary. r276215 made a change to annotate _Unwind_Exception with attribute "aligned" so that an exception object

[libcxxabi] r302981 - [libcxxabi] Do not align field unwindHeader when building for ARM EHABI.

2017-05-12 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Sat May 13 01:28:17 2017 New Revision: 302981 URL: http://llvm.org/viewvc/llvm-project?rev=302981&view=rev Log: [libcxxabi] Do not align field unwindHeader when building for ARM EHABI. For ARM EHABI, _Unwind_Exception is an alias of _Unwind_Control_Block, which is not align

[libcxxabi] r303016 - Revert r302978 and r302981.

2017-05-14 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Sun May 14 13:46:19 2017 New Revision: 303016 URL: http://llvm.org/viewvc/llvm-project?rev=303016&view=rev Log: Revert r302978 and r302981. Revert the two commits to understand why the following aarch64 bot is failing. http://lab.llvm.org:8011/builders/libcxx-libcxxabi-lib

[libcxxabi] r303175 - [libcxxabi] Align unwindHeader on a double-word boundary.

2017-05-16 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue May 16 10:19:08 2017 New Revision: 303175 URL: http://llvm.org/viewvc/llvm-project?rev=303175&view=rev Log: [libcxxabi] Align unwindHeader on a double-word boundary. r276215 made a change to annotate _Unwind_Exception with attribute "aligned" so that an exception object

[libcxxabi] r303194 - [libcxxabi] Fix the test case committed in r303175.

2017-05-16 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue May 16 13:18:03 2017 New Revision: 303194 URL: http://llvm.org/viewvc/llvm-project?rev=303194&view=rev Log: [libcxxabi] Fix the test case committed in r303175. Free the __cxa_exception object allocated with __cxa_allocate_exception. This is an attempt to fix this asan

[PATCH] D25547: [CodeGen][ObjC] Do not emit objc_storeStrong to initialize a constexpr variable

2016-10-17 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 74851. ahatanak added a comment. Simplify the code a bit more. https://reviews.llvm.org/D25547 Files: lib/CodeGen/CGDecl.cpp lib/CodeGen/CGExpr.cpp lib/CodeGen/CGObjC.cpp lib/CodeGen/CGStmtOpenMP.cpp lib/CodeGen/CodeGenFunction.h test/CodeGenOb

[PATCH] D25556: [Sema] Add variable captured by a block to the enclosing lambda's potential capture list

2016-10-17 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D25556#569809, @rjmccall wrote: > Richard should probably weigh in about whether we should be recording > potential captures at *all* capturing scopes. But at the very least, I think > you have a bug here where the variable is declared outs

[PATCH] D25547: [CodeGen][ObjC] Do not emit objc_storeStrong to initialize a constexpr variable

2016-10-17 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 74944. ahatanak added a comment. Address review comments. Simplify and add comments. https://reviews.llvm.org/D25547 Files: lib/CodeGen/CGDecl.cpp lib/CodeGen/CGExpr.cpp lib/CodeGen/CGObjC.cpp lib/CodeGen/CGStmtOpenMP.cpp lib/CodeGen/CodeGenFunct

r284516 - [CodeGen][ObjC] Do not call objc_storeStrong when initializing a

2016-10-18 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Oct 18 14:05:41 2016 New Revision: 284516 URL: http://llvm.org/viewvc/llvm-project?rev=284516&view=rev Log: [CodeGen][ObjC] Do not call objc_storeStrong when initializing a constexpr variable. When compiling a constexpr NSString initialized with an objective-c string li

[PATCH] D25547: [CodeGen][ObjC] Do not emit objc_storeStrong to initialize a constexpr variable

2016-10-18 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. ahatanak marked 2 inline comments as done. Closed by commit rL284516: [CodeGen][ObjC] Do not call objc_storeStrong when initializing a (authored by ahatanak). Changed prior to commit: https://reviews.llvm.org/D25547?vs=74

[PATCH] D25844: [Sema][ObjC] Warn about implicitly autoreleasing indirect parameters that are captured by blocks

2016-10-20 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: rjmccall. ahatanak added a subscriber: cfe-commits. ARC implicitly marks indirect parameters passed to a function as autoreleasing and passing a block that captures those parameters to another function sometimes causes problems that are

[PATCH] D25844: [Sema][ObjC] Warn about implicitly autoreleasing indirect parameters that are captured by blocks

2016-10-21 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 75442. ahatanak marked an inline comment as done. ahatanak added a comment. Improve warning messages. https://reviews.llvm.org/D25844 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.cpp te

[PATCH] D25866: [Sema] Support implicit scalar to vector conversions

2016-10-21 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaExpr.cpp:8044 // the vector element type and splat. - // FIXME: this should also work for regular vector types as supported in GCC. - if (!RHSVecType && isa(LHSVecType)) { + if (!RHSVecType && isa(LHSVecType)) {

[PATCH] D25866: [Sema] Support implicit scalar to vector conversions

2016-10-21 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaExpr.cpp:8044 // the vector element type and splat. - // FIXME: this should also work for regular vector types as supported in GCC. - if (!RHSVecType && isa(LHSVecType)) { + if (!RHSVecType && isa(LHSVecType)) {

[PATCH] D25206: [Parser] Correct typo after lambda capture initializer is parsed

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

[PATCH] D25206: [Parser] Correct typo after lambda capture initializer is parsed

2016-10-21 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: lib/Parse/ParseExprCXX.cpp:951 Init = ParseInitializer(); + Init = Actions.CorrectDelayedTyposInExpr(Init.get()); mehdi_amini wrote: > What happens when there is no typo correction to apply? If the

r285031 - [Sema][ObjC] Warn about implicitly autoreleasing out-parameters captured

2016-10-24 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Oct 24 16:45:54 2016 New Revision: 285031 URL: http://llvm.org/viewvc/llvm-project?rev=285031&view=rev Log: [Sema][ObjC] Warn about implicitly autoreleasing out-parameters captured by blocks. Add a new warning "-Wblock-capture-autoreleasing". The warning warns about imp

[PATCH] D25844: [Sema][ObjC] Warn about implicitly autoreleasing indirect parameters that are captured by blocks

2016-10-24 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285031: [Sema][ObjC] Warn about implicitly autoreleasing out-parameters captured (authored by ahatanak). Changed prior to commit: https://reviews.llvm.org/D25844?vs=75442&id=75650#toc Repository: rL

[PATCH] D25206: [Parser] Correct typo after lambda capture initializer is parsed

2016-10-25 Thread Akira Hatanaka via cfe-commits
ahatanak added reviewers: bruno, erik.pilkington, majnemer. ahatanak added a comment. Add more reviewers. https://reviews.llvm.org/D25206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[PATCH] D25206: [Parser] Correct typo after lambda capture initializer is parsed

2016-10-25 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 75819. ahatanak marked 2 inline comments as done. ahatanak added a comment. Skip the step to correct typo if ParseInitializer returns ExprError(). Add a test case that exercises the change. https://reviews.llvm.org/D25206 Files: lib/Parse/ParseExprCXX.c

[PATCH] D25556: [Sema] Add variable captured by a block to the enclosing lambda's potential capture list

2016-10-26 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 75956. ahatanak added a comment. Add the variable to the list of potential captures only if it's declared outside of the lambda expression. I don't think we need to check that the variable is declared outside of the lambda because getStackIndexOfNearestEnc

[PATCH] D26166: [Sema] Don't issue analysis-based warnings when a fatal error has occurred

2016-10-31 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added reviewers: rsmith, majnemer. ahatanak added a subscriber: cfe-commits. This patch makes AnalysisBasedWarnings::IssueWarnings return without issuing warnings based on CFG analysis when a fatal error has occurred. This is needed to avoid a crash that

[PATCH] D26166: [Sema] Don't issue analysis-based warnings when a fatal error has occurred

2016-10-31 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 76513. ahatanak added a comment. I think the non-uncompilable error you mentioned is the one on line 7 of the test case and the uncompilable error is the one on line 15. Is that correct? The modified test case has only one error (on line 7, which is promote

[PATCH] D26166: [Sema] Don't issue analysis-based warnings when a fatal error has occurred

2016-10-31 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 76521. ahatanak added a comment. Thanks, that fixed the failing regression tests. https://reviews.llvm.org/D26166 Files: lib/Sema/SemaTemplateInstantiate.cpp test/SemaCXX/instantiate-template-fatal-error.cpp Index: test/SemaCXX/instantiate-template-f

[PATCH] D26166: [Sema] Don't issue analysis-based warnings when a fatal error has occurred

2016-11-03 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285923: [Sema] Avoid instantiating templates only when UncompilableErrorOccurred (authored by ahatanak). Changed prior to commit: https://reviews.llvm.org/D26166?vs=76521&id=76863#toc Repository: rL

r285923 - [Sema] Avoid instantiating templates only when UncompilableErrorOccurred

2016-11-03 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Nov 3 10:04:58 2016 New Revision: 285923 URL: http://llvm.org/viewvc/llvm-project?rev=285923&view=rev Log: [Sema] Avoid instantiating templates only when UncompilableErrorOccurred and FatalErrorOccurred are both set. This fixes a crash that occurs when a warning promot

r285938 - Fix spelling mistake.

2016-11-03 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Nov 3 12:11:28 2016 New Revision: 285938 URL: http://llvm.org/viewvc/llvm-project?rev=285938&view=rev Log: Fix spelling mistake. Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp URL: http://llvm.org

Re: [PATCH] D26166: [Sema] Don't issue analysis-based warnings when a fatal error has occurred

2016-11-03 Thread Akira Hatanaka via cfe-commits
Thanks, fixed in r285938. > On Nov 3, 2016, at 8:27 AM, Malcolm Parsons via cfe-commits > wrote: > > malcolm.parsons added inline comments. > > > > Comment at: cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp:213 > + // Don't allow further instantiation if a fatal error and an

[PATCH] D24969: [Sema] Use the instantiated name of destructors in FindInstantiatedDecl and RebuildMemberExpr

2016-11-03 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 76883. ahatanak added a comment. Rebase. Pass the destructor's DeclarationNameInfo to the call to RebuildMemberExpr rather than getting it inside RebuildMemberExpr. https://reviews.llvm.org/D24969 Files: lib/Sema/SemaTemplateInstantiateDecl.cpp lib/Se

[PATCH] D26108: Add -Wnullability-completeness-on-arrays.

2016-11-07 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Hi Jordan, It seems that this patch doesn't apply cleanly. Can you rebase it? Repository: rL LLVM https://reviews.llvm.org/D26108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

[PATCH] D26108: Add -Wnullability-completeness-on-arrays.

2016-11-09 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D26108#591270, @jordan_rose wrote: > Ah, my apologies, @ahatanak. I was testing against the Swift branch of Clang. That's OK. I haven't tested it yet, but the patch itself looks fine to me. Comment at: lib/Sema/SemaType.c

[PATCH] D26108: Add -Wnullability-completeness-on-arrays.

2016-11-09 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaType.cpp:3988 // Allow arrays of auto if we are a generic lambda parameter. // i.e. [](auto (&array)[5]) { return array[0]; }; OK if (AT && D.getContext() != Declarator::LambdaExprParameterContext) { --

[PATCH] D23096: [Sema] Pass CombineWithOuterScope = true to constructor of LocalInstantiationScope

2016-11-09 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Do you think we can transform the Exprs for the uninstantiated default arguments in TreeTransform::TransformLambdaExpr? I guess it would be much simpler than trying to make getTemplateInstantiationArgs return the correct template arguments. https://reviews.llvm.org/D

[PATCH] D23096: [Sema] Pass CombineWithOuterScope = true to constructor of LocalInstantiationScope

2016-11-11 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 77691. ahatanak added a comment. - Transform uninstantiated default arguments Exprs in TreeTransform::TransformLambdaExpr. - In default-expr-arguments-3.cpp, check that there are no crashes or diagnostics emitted instead of printing the AST. https://revie

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] 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 -mstackrea

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 "rest

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

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&view=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 lon

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&id=34569#toc Repository: rL L

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 optimization

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 w

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 @@ > > > > +def DisableTailCalls : InheritableAttr {

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: include/clang/Bas

[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 dif

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] 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
ahatanak created this revision. ahatanak added a subscriber: cfe-commits. An assert is triggered when the test case program is compiled with -Oz: Assertion failed: (!F->hasFnAttribute(llvm::Attribute::OptimizeForSize) && "OptimizeNone and OptimizeForSize on same function!"), function SetLLVMFun

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 sub

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&view=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 th

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
This revision was automatically updated to reflect the committed changes. Closed by commit rL248191: Remove attributes minsize and optsize, which conflict with optnone. (authored by ahatanak). Changed prior to commit: http://reviews.llvm.org/D13004?vs=35214&id=35288#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_ __Block_byref_object_c

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 t

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 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 option

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 wrote: > > > On Mon, Aug 17, 2015 at 11:57 AM Akira Hatanaka > wrote: > >> On Thu, Aug 13, 2015 at 5:56 PM, Eric Christopher >> wrote: >> >>> > Apologies, I'm really resistant to more things being used in > TargetOptions and I was (pe

[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). http

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 include/clang/Frontend/

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=245866&view=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

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=32561&id=32989#toc Repository: rL LLVM ht

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=245871&view=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 Modif

[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. T

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 in

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=246054&view=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 targe

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: > > > > Th

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: > > > > ec

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 "no-rea

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 ignor

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 tha

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 real

[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 lib/CodeG

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

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

2015-09-02 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: > We already have an attribute that is tangentially rel

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: cfe-commits. > > > > This patch

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

2015-10-08 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 36886. ahatanak added a comment. Changed CodeGenModule::SetLLVMFunctionAttributesForDefinition to use early return. I'll first commit the NFC patch to fix CodeGenModule::SetLLVMFunctionAttributesForDefinition and commit the rest after that. http://revie

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&view=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 pas

r249735 - [CodeGen] [CodeGen] Attach function attributes to functions created in

2015-10-08 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Oct 8 15:26:34 2015 New Revision: 249735 URL: http://llvm.org/viewvc/llvm-project?rev=249735&view=rev Log: [CodeGen] [CodeGen] Attach function attributes to functions created in CGBlocks.cpp. This commit fixes a bug in clang's code-gen where it creates the following fu

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&id=36891#toc Repository: rL LLV

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

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 be

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 mi

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 term

[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"); vo

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

[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: lib/CodeGen/C

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 SetLLVMFunctionAt

<    1   2   3   4   5   6   7   8   9   10   >