[llvm] 81f7607 - [PowerPC][AIX} FIx AIX bootstrap build.

Sean Fertile via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 2 06:31:56 PDT 2021


Author: Sean Fertile
Date: 2021-06-02T09:31:11-04:00
New Revision: 81f7607f7c7dadc9da2345455fa8e6f5eb9788f1

URL: https://github.com/llvm/llvm-project/commit/81f7607f7c7dadc9da2345455fa8e6f5eb9788f1
DIFF: https://github.com/llvm/llvm-project/commit/81f7607f7c7dadc9da2345455fa8e6f5eb9788f1.diff

LOG: [PowerPC][AIX} FIx AIX bootstrap build.

A recent patch:
https://reviews.llvm.org/rGe0921655b1ff8d4ba7c14be59252fe05b705920e
changed clangs AIX bitfield handling to use 4-byte bitfield containers,
matching XLs behavior. This change triggers static assert failures when
bootstrapping. Change the macro we check to enable bitfield packing on
AIX to `__clang__` which is defined by both xlclang and clang.

Differential Revision: https://reviews.llvm.org/D103474

Added: 
    

Modified: 
    llvm/include/llvm/CodeGen/SelectionDAGNodes.h
    llvm/include/llvm/IR/BasicBlock.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
index 43f35270f196..dc58dd33c5c8 100644
--- a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -462,7 +462,7 @@ class SDNode : public FoldingSetNode, public ilist_node<SDNode> {
   // SubclassData.  These are designed to fit within a uint16_t so they pack
   // with NodeType.
 
-#if defined(_AIX) && (!defined(__GNUC__) || defined(__ibmxl__))
+#if defined(_AIX) && (!defined(__GNUC__) || defined(__clang__))
 // 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)")

diff  --git a/llvm/include/llvm/IR/BasicBlock.h b/llvm/include/llvm/IR/BasicBlock.h
index db831bdb3790..0af4ec4ef138 100644
--- a/llvm/include/llvm/IR/BasicBlock.h
+++ b/llvm/include/llvm/IR/BasicBlock.h
@@ -513,7 +513,7 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
   void validateInstrOrdering() const;
 
 private:
-#if defined(_AIX) && (!defined(__GNUC__) || defined(__ibmxl__))
+#if defined(_AIX) && (!defined(__GNUC__) || defined(__clang__))
 // 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)")


        


More information about the llvm-commits mailing list