[PATCH] D78563: [AIX] Port power alignment rules to clang
Jason Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 21 15:11:50 PDT 2020
jasonliu added inline comments.
================
Comment at: clang/include/clang/AST/RecordLayout.h:81
+ /// AIXOffsetAlignment - The special AIX Alignment for the object that
+ /// contains floating-point member or sub-member. This is for AIX-abi only.
----------------
AIX Alignment -> AIX alignment
================
Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1013
+ UpdateAlignment(BaseAlign, UnpackedBaseAlign,
+ /*AIXOffsetAlignment : used by AIX-ABI*/
+ BaseAlign);
----------------
Consistent spelling as: AIX-abi?
================
Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1853
+ // AIX abi has this special rule that in aggregates, the first member of
+ // floating point data type(or aggregate type contains floating point data
----------------
Consistent spelling as AIX-abi?
================
Comment at: clang/test/Layout/aix-double-struct-member.cpp:136
+// CHECK-NEXT: | nvsize=12, nvalign=4]
+}; // namespace test4
----------------
jasonliu wrote:
> 1. I think we also want to test empty base class with a derived class contains double as first. And also a non-empty base class with derived contains double as first to show that it has effect on basic inheritance as well.
> 2. We need one more test for seeing how pack align interact with AIX alignment.
We also want to test if MaxFieldAlignment could override the AIX alignment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78563/new/
https://reviews.llvm.org/D78563
More information about the cfe-commits
mailing list