[PATCH] D18035: [GCC] PR23529 Mangler part of attrbute abi_tag support

2016-03-10 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin created this revision. DmitryPolukhin added a reviewer: majnemer. DmitryPolukhin added subscribers: cfe-commits, aaron.ballman, stbuehler. Original patch by Stefan Bühler http://reviews.llvm.org/D12834 Difference between original and this one: - fixed all failing tests - fixed man

r263052 - NFC fix documentation build by rL263015

2016-03-09 Thread Dmitry Polukhin via cfe-commits
Author: dpolukhin Date: Wed Mar 9 13:39:16 2016 New Revision: 263052 URL: http://llvm.org/viewvc/llvm-project?rev=263052&view=rev Log: NFC fix documentation build by rL263015 This time I hope it will fix the build for real. Modified: cfe/trunk/docs/ItaniumMangleAbiTags.rst cfe/trunk/doc

r263023 - NFC fix documentation build by rL263015

2016-03-09 Thread Dmitry Polukhin via cfe-commits
Author: dpolukhin Date: Wed Mar 9 10:19:04 2016 New Revision: 263023 URL: http://llvm.org/viewvc/llvm-project?rev=263023&view=rev Log: NFC fix documentation build by rL263015 Modified: cfe/trunk/docs/ItaniumMangleAbiTags.rst Modified: cfe/trunk/docs/ItaniumMangleAbiTags.rst URL: http://llv

r263015 - [GCC] PR23529 Sema part of attrbute abi_tag support

2016-03-09 Thread Dmitry Polukhin via cfe-commits
Author: dpolukhin Date: Wed Mar 9 09:30:53 2016 New Revision: 263015 URL: http://llvm.org/viewvc/llvm-project?rev=263015&view=rev Log: [GCC] PR23529 Sema part of attrbute abi_tag support Original patch by Stefan Bühler http://reviews.llvm.org/D12834 Difference between original and this one: - f

Re: [PATCH] D17567: [GCC] PR23529 Sema part of attrbute abi_tag support

2016-03-09 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added a comment. Thank you for the comments! Comment at: docs/ItaniumMangleAbiTags.rst:83 @@ +82,3 @@ +For s all active tags used in the local part () are available, but not implicit tags which were not active! + aaron.ballman wrote: > Replace the

Re: [PATCH] D17567: [GCC] PR23529 Sema part of attrbute abi_tag support

2016-03-09 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin updated this revision to Diff 50113. DmitryPolukhin marked 17 inline comments as done. DmitryPolukhin added a comment. - fixed comments - rebase with resolving conflicts http://reviews.llvm.org/D17567 Files: docs/ItaniumMangleAbiTags.rst include/clang/Basic/Attr.td include/

Re: [PATCH] D17567: [GCC] PR23529 Sema part of attrbute abi_tag support

2016-03-02 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin updated this revision to Diff 49617. DmitryPolukhin marked an inline comment as done. DmitryPolukhin added a comment. Rebase http://reviews.llvm.org/D17567 Files: docs/ItaniumMangleAbiTags.rst include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic

Re: [PATCH] D17567: [GCC] PR23529 Sema part of attrbute abi_tag support

2016-03-02 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added a comment. Aaron, friendly ping, please take a look! http://reviews.llvm.org/D17567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D17567: [GCC] Sema part of attrbute abi_tag support

2016-02-24 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin created this revision. DmitryPolukhin added a reviewer: aaron.ballman. DmitryPolukhin added subscribers: cfe-commits, stbuehler. Original patch by Stefan Bühler http://reviews.llvm.org/D12834 Difference between original and this one: - fixed all comments in original code review - a

r260811 - [OPENMP] NFC rewrite ParseOpenMPDirectiveKind

2016-02-12 Thread Dmitry Polukhin via cfe-commits
Author: dpolukhin Date: Sat Feb 13 00:53:38 2016 New Revision: 260811 URL: http://llvm.org/viewvc/llvm-project?rev=260811&view=rev Log: [OPENMP] NFC rewrite ParseOpenMPDirectiveKind New implementation is easier to read and extend. Differential Revision: http://reviews.llvm.org/D17197 Modified:

[PATCH] D17197: [OPENMP] NFC rewrite ParseOpenMPDirectiveKind

2016-02-12 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin created this revision. DmitryPolukhin added a reviewer: ABataev. DmitryPolukhin added a subscriber: cfe-commits. New implementation is easier to read and extend. http://reviews.llvm.org/D17197 Files: lib/Parse/ParseOpenMP.cpp Index: lib/Parse/ParseOpenMP.cpp ===

Re: [PATCH] D17023: pr26544: Bitfield layout with pragma pack and attributes "packed" and "aligned

2016-02-11 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added a comment. John, this patch extends check that I added recently and looks good to me but could you please also take a look. http://reviews.llvm.org/D17023 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

Re: [PATCH] D12834: add gcc abi_tag support

2016-02-08 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added a comment. Hi Stefan, What are your plans about this patch? The patch has number of comments about Sema part from Aaron and me but in general there are no major issues with Sema for the attribute. As for mangling part I think recursive approach looks reasonable because al

Re: [PATCH] D12834: add gcc abi_tag support

2016-02-03 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added a comment. I think Sema part should be exacted to separate patch and committed first after fixing Aaron's comments. Mangling part requires more work and much more tests. I'm still looking what actually GCC does and how it can be re-implemented in Clang without calling mangl

Re: [PATCH] D16572: PR23057: fix use-after-free due to local token buffer in ParseCXXAmbiguousParenExpression

2016-02-02 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin updated this revision to Diff 46644. DmitryPolukhin added a comment. Use EOF token instead of copy buffer. This approach looks a bit more fragile but definitely more efficient, PTAL. http://reviews.llvm.org/D16572 Files: lib/Parse/ParseExprCXX.cpp test/Parser/cxx-ambig-paren

Re: [PATCH] D16607: Implementation of PS4 ABI, round 1

2016-01-28 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added a comment. LGTM http://reviews.llvm.org/D16607 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16572: PR23057: fix use-after-free due to local token buffer in ParseCXXAmbiguousParenExpression

2016-01-26 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added a comment. I didn't introduce a leak because I pass ownership of the Buffer to EnterTokenStream (i.e. pass true as the last argument OwnsTokens). ASan also doesn't report a leak with my patch. Original code didn't have double free because it used call EnterTokenStream with

[PATCH] D16572: PR23057: fix use-after-free due to local token buffer in ParseCXXAmbiguousParenExpression

2016-01-26 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin created this revision. DmitryPolukhin added a reviewer: rjmccall. DmitryPolukhin added a subscriber: cfe-commits. To completely eliminate use-after-free in this place I had to copy tokens into new array and pass ownership. As far as I understand the code it is not possible to guar

[PATCH] D16065: Fix infinite recursion for invalid declaration

2016-01-11 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin created this revision. DmitryPolukhin added a reviewer: rsmith. DmitryPolukhin added subscribers: cfe-commits, kcc. Fix for a case found by fuzzing PR23057 (comment #25 https://llvm.org/bugs/show_bug.cgi?id=23057#c25). http://reviews.llvm.org/D16065 Files: lib/AST/Decl.cpp te

Re: [PATCH] D14980: PR18513: make gcc compatible layout for bit-fields with explicit aligned attribute

2016-01-11 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added a comment. John and Richard, I would like to proceed with this patch one way or another. If this patch cannot be accepted in upstream, I'll discard it. On the other hand I'm ready to improve this patch further if it is OK in principle but needs more work. Please let me kno

Re: [PATCH] D15524: [GCC] Attribute ifunc support in clang

2015-12-30 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added a comment. Thank you for the review! I'm waiting for llvm part of ifunc support because it has to be committed first. http://reviews.llvm.org/D15524 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

Re: [PATCH] D15524: [GCC] Attribute ifunc support in clang

2015-12-29 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin updated this revision to Diff 43775. DmitryPolukhin marked 8 inline comments as done. DmitryPolukhin added a comment. Fixed comments. http://reviews.llvm.org/D15524 Files: include/clang/AST/DeclBase.h include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/cla

Re: [PATCH] D15524: [GCC] Attribute ifunc support in clang

2015-12-29 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin updated this revision to Diff 43721. DmitryPolukhin marked 17 inline comments as done. DmitryPolukhin added a comment. Comments resolved + this patch uses new GlobalIFunc representation in llvm. http://reviews.llvm.org/D15524 Files: include/clang/AST/DeclBase.h include/clang/

Re: [PATCH] D15524: [GCC] Attribute ifunc support in clang

2015-12-29 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:2700 @@ -2685,3 +2699,3 @@ return; Aliases.push_back(GD); rjmccall wrote: > Please diagnose that the resolver function has the appropriate type here. > Given the constraint

Re: [PATCH] D14980: PR18513: make gcc compatible layout for bit-fields with explicit aligned attribute

2015-12-21 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added a comment. Friendly ping. I don't think this change makes APCS mode worse. As an alternative I could return to the variant that doesn't change anything for APCS case. Please let me know if APCS case must be resolved and TODO is not enough for committing this change. http

Re: [PATCH] D15524: [GCC] Attribute ifunc support in clang

2015-12-17 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added a comment. John, I'm still working on new patch but meanwhile I would like to clarify few things in your comments. Comment at: include/clang/Basic/AttrDocs.td:1866 @@ +1865,3 @@ + let Content = [{ +The attribute ``__attribute__((ifunc("resolver")))`` is us

[PATCH] D15524: [GCC] Attribute ifunc support in clang

2015-12-15 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin created this revision. DmitryPolukhin added reviewers: aaron.ballman, rjmccall. DmitryPolukhin added a subscriber: cfe-commits. This patch add support for GCC __attribute__((ifunc("resolver"))) for targets that use ELF as object file format. In general ifunc is a special kind of f

Re: [PATCH] D14980: PR18513: make gcc compatible layout for bit-fields with explicit aligned attribute

2015-12-13 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added a comment. John and Richard, I think this patch fixes important ABI compatibility issue with GCC and if there are no more comments, I think it makes sense to commit it. Could you please approve this CL? Thanks, Dmitry http://reviews.llvm.org/D14980 ___

Re: [PATCH] D14980: PR18513: make gcc compatible layout for bit-fields with explicit aligned attribute

2015-12-07 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added a comment. Added TODO, any other comments or suggestions? http://reviews.llvm.org/D14980 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14980: PR18513: make gcc compatible layout for bit-fields with explicit aligned attribute

2015-12-04 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin updated this revision to Diff 41866. DmitryPolukhin added a comment. Added TODO. http://reviews.llvm.org/D14980 Files: lib/AST/RecordLayoutBuilder.cpp test/Sema/bitfield-layout.c Index: test/Sema/bitfield-layout.c =

Re: [PATCH] D14980: PR18513: make gcc compatible layout for bit-fields with explicit aligned attribute

2015-12-04 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added inline comments. Comment at: lib/AST/RecordLayoutBuilder.cpp:1606 @@ +1605,3 @@ +} else if (ExplicitFieldAlign && + Context.getTargetInfo().useBitFieldTypeAlignment()) + FieldOffset = llvm::RoundUpToAlignment(FieldOffset, ExplicitFieldAl

Re: [PATCH] D14980: PR18513: make gcc compatible layout for bit-fields with explicit aligned attribute

2015-12-03 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added inline comments. Comment at: lib/AST/RecordLayoutBuilder.cpp:1606 @@ -1605,1 +1605,3 @@ +} else if (ExplicitFieldAlign) + FieldOffset = llvm::RoundUpToAlignment(FieldOffset, ExplicitFieldAlign); rjmccall wrote: > Be sure to test spe

Re: [PATCH] D14980: PR18513: make gcc compatible layout for bit-fields with explicit aligned attribute

2015-12-03 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin updated this revision to Diff 41748. http://reviews.llvm.org/D14980 Files: lib/AST/RecordLayoutBuilder.cpp test/Sema/bitfield-layout.c Index: test/Sema/bitfield-layout.c === --- test/Sema/bitfield-layout.c +++ tes

Re: [PATCH] D14872: PR25575: Make GCC 4.4+ comatible layout for packed bit-fileds of char type

2015-12-02 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin updated this revision to Diff 41648. DmitryPolukhin marked 2 inline comments as done. DmitryPolukhin added a comment. Fixed warning and comment. http://reviews.llvm.org/D14872 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDeclAttr.cpp test/Sema/struct-packe

Re: [PATCH] D14980: PR18513: make gcc compatible layout for bit-fields with explicit aligned attribute

2015-12-02 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added a comment. This CL doesn't changes anything for ms_struct cases and ms_struct seems to be broken for bit-fields even for very simple cases so filed separate bug https://llvm.org/bugs/show_bug.cgi?id=25707 PTAL Comment at: lib/AST/RecordLayoutBuilder.cpp:1

Re: [PATCH] D14980: PR18513: make gcc compatible layout for bit-fields with explicit aligned attribute

2015-12-02 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin updated this revision to Diff 41611. DmitryPolukhin marked an inline comment as done. DmitryPolukhin added a comment. Fixed logic for warning calculation and added even more test-cases. http://reviews.llvm.org/D14980 Files: lib/AST/RecordLayoutBuilder.cpp test/Sema/bitfield-l

Re: [PATCH] D14872: PR25575: Make GCC 4.4+ comatible layout for packed bit-fileds of char type

2015-12-02 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin updated this revision to Diff 41597. DmitryPolukhin marked an inline comment as done. DmitryPolukhin added a comment. Warning text updated, PTAL. http://reviews.llvm.org/D14872 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDeclAttr.cpp test/Sema/struct-pack

Re: [PATCH] D14872: PR25575: Make GCC 4.4+ comatible layout for packed bit-fileds of char type

2015-12-01 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin updated this revision to Diff 41510. DmitryPolukhin marked an inline comment as done. DmitryPolukhin added a comment. Don't call getDeclName() that it is not required. PTAL http://reviews.llvm.org/D14872 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDeclAttr.

Re: [PATCH] D14872: PR25575: Make GCC 4.4+ comatible layout for packed bit-fileds of char type

2015-12-01 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added a comment. This is another GCC ABI compatibility issue. If there is no more comments, could someone please approve this CL? http://reviews.llvm.org/D14872 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

Re: [PATCH] D14980: PR18513: make gcc compatible layout for bit-fields with explicit aligned attribute

2015-12-01 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added a comment. I added more testcases and they all pass identically on GCC and clang with my patch. Please let me know if you think, that some cases are not covered or doesn't work with my patch. Perhaps we can reduce number of test-cases because some of them almost duplicates

Re: [PATCH] D14980: PR18513: make gcc compatible layout for bit-fields with explicit aligned attribute

2015-12-01 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin updated this revision to Diff 41481. DmitryPolukhin added a comment. Added more testcases to cover combination of explicit alignment of bit-filed with packed attribute. Also added testing on ARM for bit-filed layout test. http://reviews.llvm.org/D14980 Files: lib/AST/RecordLay

Re: [PATCH] D14980: PR18513: make gcc compatible layout for bit-fields with explicit aligned attribute

2015-11-30 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added a comment. Friendly ping, any comments about this patch? http://reviews.llvm.org/D14980 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14872: PR25575: Make GCC 4.4+ comatible layout for packed bit-fileds of char type

2015-11-26 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin updated this revision to Diff 41222. DmitryPolukhin marked 2 inline comments as done. DmitryPolukhin added a comment. Changed note text message + fixed outdated comment. http://reviews.llvm.org/D14872 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDeclAttr.cpp

Re: [PATCH] D14872: PR25575: Make GCC 4.4+ comatible layout for packed bit-fileds of char type

2015-11-25 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin updated this revision to Diff 41131. DmitryPolukhin added a comment. Added warning about semantic change + uploaded context. PTAL http://reviews.llvm.org/D14872 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDeclAttr.cpp test/Sema/struct-packed-align.c Inde

[PATCH] D14980: PR18513: make gcc compatible layout for bit-fields with explicit aligned attribute

2015-11-25 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin created this revision. DmitryPolukhin added a reviewer: rjmccall. DmitryPolukhin added a subscriber: cfe-commits. Fix binary compatibility issue with GCC. http://reviews.llvm.org/D14980 Files: lib/AST/RecordLayoutBuilder.cpp test/Sema/bitfield-layout.c Index: test/Sema/bitfie

Re: [PATCH] D14872: PR25575: Make GCC 4.4+ comatible layout for packed bit-fileds of char type

2015-11-23 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added a comment. It seems that check for type alignment <= 8 was there practically forever http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaDecl.cpp?r1=47197&r2=47196&pathrev=47197 and there is no good explanation why it was implemented. Subsequent changes only add more con

[PATCH] D14872: PR25575: Make GCC 4.4+ comatible layout for packed bit-fileds of char type

2015-11-20 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin created this revision. DmitryPolukhin added a reviewer: aaron.ballman. DmitryPolukhin added a subscriber: cfe-commits. This CL is for discussion how to better fix bit-filed layout compatibility issue with GCC (see PR25575 for test case and more details). Current clang behavior is

Re: [PATCH] D14744: PR10235: support for vector mode attributes + warning

2015-11-18 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin updated this revision to Diff 40506. DmitryPolukhin marked 3 inline comments as done. http://reviews.llvm.org/D14744 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDeclAttr.cpp test/Sema/attr-mode-vector-types.c Index

Re: [PATCH] D14744: PR10235: support for vector mode attributes + warning

2015-11-18 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:3315 @@ +3314,3 @@ + llvm::APInt VectorSize(64, 0); + if (Str.size() >= 4 && Str[0] == 'V') { +// Minimal length of vector mode is 4: 'V' + NUMBER(>=1) + TYPE(>=2). aaron.ballman wro

Re: [PATCH] D14744: PR10235: support for vector mode attributes + warning

2015-11-18 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin updated this revision to Diff 40489. DmitryPolukhin added a comment. Added new warning group as suggested. I see thousands of vector types in headers on GitHub https://github.com/search?p=1&q=%22__attribute__+mode+v4sf%22+extension%3Ah&ref=searchresults&type=Code&utf8=%E2%9C%93 l

Re: [PATCH] D14744: PR10235: support for vector mode attributes + warning

2015-11-17 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added a comment. Thank you for prompt response! Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2765 @@ +2764,3 @@ +def warn_vector_mode_deprecated : Warning< + "specifying vector types with __attribute__ ((mode)) is deprecated, " + "use __attribute__ ((v

[PATCH] D14744: PR10235: support for vector mode attributes + warning

2015-11-17 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin created this revision. DmitryPolukhin added a reviewer: aaron.ballman. DmitryPolukhin added a subscriber: cfe-commits. Add support for vector mode attributes like "__attribute__((mode(V4SF)))". Also add warning about deprecated vector modes like GCC does. http://reviews.llvm.org/D

<    1   2   3