[PATCH] D60164: [AIX] SelectionDAGNodes.h: Pack bit-fields that are meant to be packed
Hubert Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 3 17:33:42 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL357661: [AIX] SelectionDAGNodes.h: Pack bit-fields that are meant to be packed (authored by hubert.reinterpretcast, committed by ).
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60164/new/
https://reviews.llvm.org/D60164
Files:
llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
Index: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
===================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -488,6 +488,17 @@
// SubclassData. These are designed to fit within a uint16_t so they pack
// with NodeType.
+#if defined(_AIX) && (!defined(__GNUC__) || defined(__ibmxl__))
+// Except for GCC; by default, AIX compilers store bit-fields in 4-byte words
+// and give the `pack` pragma push semantics.
+#define BEGIN_TWO_BYTE_PACK() _Pragma("pack(2)")
+#define END_TWO_BYTE_PACK() _Pragma("pack(pop)")
+#else
+#define BEGIN_TWO_BYTE_PACK()
+#define END_TWO_BYTE_PACK()
+#endif
+
+BEGIN_TWO_BYTE_PACK()
class SDNodeBitfields {
friend class SDNode;
friend class MemIntrinsicSDNode;
@@ -560,6 +571,9 @@
LoadSDNodeBitfields LoadSDNodeBits;
StoreSDNodeBitfields StoreSDNodeBits;
};
+END_TWO_BYTE_PACK()
+#undef BEGIN_TWO_BYTE_PACK
+#undef END_TWO_BYTE_PACK
// RawSDNodeBits must cover the entirety of the union. This means that all of
// the union's members must have size <= RawSDNodeBits. We write the RHS as
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60164.193635.patch
Type: text/x-patch
Size: 1192 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190404/777bd5c4/attachment.bin>
More information about the llvm-commits
mailing list