[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-29 Thread Steven Wan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG71b170ccf36e: [AIX] "aligned" attribute does not decrease alignment (authored by stevewan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https:

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-29 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thanks, LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107394 __

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-29 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 369319. stevewan added a comment. Rename lambda and add comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107394 Files: clang/lib/AST/RecordLayoutBuilder.cpp cla

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1975 + bool AlignAttrCanDecreaseAlignment = + AlignIsRequired && (Ty->getAs() != nullptr || FieldPacked); + stevewan wrote: > rjmccall wrote: > > stevewan wrote: > > > rjmccal

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Thanks, this looks a lot cleaner. Minor requests only. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107394 ___ cfe-commits mailing list c

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-28 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 369293. stevewan added a comment. Adapt to new TypeInfo design Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107394 Files: clang/lib/AST/ASTContext.cpp clang/lib/AST/

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-27 Thread Steven Wan via Phabricator via cfe-commits
stevewan added a comment. In D107394#2970326 , @rjmccall wrote: > Please add me to the review for the other patch and I'll approve it pretty > quickly, and then we can get back to this one. Sorry for the delay. Posted https://reviews.llvm.org/D108858, o

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Please add me to the review for the other patch and I'll approve it pretty quickly, and then we can get back to this one. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107394 ___

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-27 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 369177. stevewan added a comment. Fix missing "&&" Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107394 Files: clang/include/clang/AST/ASTContext.h clang/lib/AST/ASTC

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-27 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 369164. stevewan added a comment. Fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107394 Files: clang/include/clang/AST/ASTContext.h clang/lib/AST/ASTContext.c

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-27 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 369163. stevewan marked an inline comment as done. stevewan added a comment. Cleanup the condition check Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107394 Files: cla

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Thanks, style suggestion aside, this looks great. Would you mind doing the TypeInfo change in a separate patch? The functional change for AIX can be a really small improvement on top of that. Comment at: clang/include/clang/AST/ASTContext.h:167 +

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-27 Thread Steven Wan via Phabricator via cfe-commits
stevewan marked an inline comment as done. stevewan added inline comments. Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1984 +auto checkTypeIsTypedef = [](auto &&checkTypeIsTypedef, + const auto Ty) -> bool { + bool isTypedef = false;

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-27 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 369157. stevewan added a comment. Make TypeInfo carry more information about "aligned" attribute Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107394 Files: clang/inclu

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1984 +auto checkTypeIsTypedef = [](auto &&checkTypeIsTypedef, + const auto Ty) -> bool { + bool isTypedef = false; Hah. The knot-tying here

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-25 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 368716. stevewan marked an inline comment as done. stevewan added a comment. Avoid unannotated fall-through between cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-25 Thread Steven Wan via Phabricator via cfe-commits
stevewan marked 2 inline comments as done. stevewan added inline comments. Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1975 + bool AlignAttrCanDecreaseAlignment = + AlignIsRequired && (Ty->getAs() != nullptr || FieldPacked); + rjmccall wrote: > stevew

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-25 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 368702. stevewan added a comment. Herald added a subscriber: jfb. Add recursive check for typedef Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107394 Files: clang/lib/

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-23 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1975 + bool AlignAttrCanDecreaseAlignment = + AlignIsRequired && (Ty->getAs() != nullptr || FieldPacked); + stevewan wrote: > rjmccall wrote: > > Okay, so first off, the comme

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-20 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 367942. stevewan added a comment. Fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107394 Files: clang/lib/AST/RecordLayoutBuilder.cpp clang/test/Layout/aix-ali

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-20 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 367875. stevewan added a comment. De-Morgan-ize if condition for readability Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107394 Files: clang/lib/AST/RecordLayoutBuild

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-20 Thread Steven Wan via Phabricator via cfe-commits
stevewan added inline comments. Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1975 + bool AlignAttrCanDecreaseAlignment = + AlignIsRequired && (Ty->getAs() != nullptr || FieldPacked); + rjmccall wrote: > Okay, so first off, the comment and variable name

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-20 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 367833. stevewan added a comment. Address comments about the check Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107394 Files: clang/lib/AST/RecordLayoutBuilder.cpp c

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1975 + bool AlignAttrCanDecreaseAlignment = + AlignIsRequired && (Ty->getAs() != nullptr || FieldPacked); + Okay, so first off, the comment and variable names here make this s

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-18 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 367312. stevewan added a comment. Fields marked attribute "aligned" and "packed" don't need to go through alignment upgrade Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-12 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 366051. stevewan added a comment. Rebase to latest main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107394 Files: clang/lib/AST/RecordLayoutBuilder.cpp clang/test/L

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-06 Thread Steven Wan via Phabricator via cfe-commits
stevewan planned changes to this revision. stevewan added a comment. The query portion has been split out as https://reviews.llvm.org/D107598, which needs to be cleaned out from this patch. The record layout part also needs update as we uncover more problems with the current implementation. Re

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-04 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 364359. stevewan added a comment. Add test cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107394 Files: clang/lib/AST/ASTContext.cpp clang/lib/AST/RecordLayoutBu

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-04 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 364350. stevewan marked an inline comment as done. stevewan added a comment. Fix the same problem in field layout. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107394 Fi

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-04 Thread Sean Fertile via Phabricator via cfe-commits
sfertile added a comment. Thanks Steven, LGTM. Comment at: clang/test/Layout/aix-alignof-align-and-pack-attr.cpp:11 + +// CHECK: @c = global %struct.C zeroinitializer, align 2 stevewan wrote: > sfertile wrote: > > Minor nit: I think the other test can live in t

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-04 Thread Steven Wan via Phabricator via cfe-commits
stevewan marked an inline comment as done. stevewan added inline comments. Comment at: clang/test/Layout/aix-alignof-align-and-pack-attr.cpp:11 + +// CHECK: @c = global %struct.C zeroinitializer, align 2 sfertile wrote: > Minor nit: I think the other test can liv

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-04 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 364186. stevewan added a comment. Merge tests into one file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107394 Files: clang/lib/AST/ASTContext.cpp clang/test/Layout

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-04 Thread Sean Fertile via Phabricator via cfe-commits
sfertile added inline comments. Comment at: clang/test/Layout/aix-alignof-align-and-pack-attr.cpp:11 + +// CHECK: @c = global %struct.C zeroinitializer, align 2 Minor nit: I think the other test can live in this file, highlighting the difference between the 2 ca

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-03 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 363870. stevewan added a comment. Fix incomplete diff, please discard last update. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107394 Files: clang/lib/AST/ASTContext.

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-03 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 363860. stevewan added a comment. Attr 'packed' is already taken into account in ABIAlign/PreferredAlign Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107394 Files: cla

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-03 Thread Steven Wan via Phabricator via cfe-commits
stevewan created this revision. stevewan requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The "aligned" attribute can only increase the alignment of a struct, or struct member, unless it's used together with the "packed" attribute, or used a