[Mlir-commits] [mlir] [mlir] Align mlir::Block (PR #106717)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Aug 30 05:27:20 PDT 2024


https://github.com/JoelWee created https://github.com/llvm/llvm-project/pull/106717

This fixes an error from the LatticeAnchor PointerUnion with ProgramPoint in b6603e1bf1

```
third_party/llvm/llvm-project/llvm/include/llvm/ADT/PointerIntPair.h:172:17: error: static assertion failed due to requirement '2U <= PointerUnionUIntTraits<mlir::GenericLatticeAnchor *, mlir::ProgramPoint, mlir::Value>::NumLowBitsAvailable': PointerIntPair with integer size too large for pointer
  172 |   static_assert(IntBits <= PtrTraits::NumLowBitsAvailable,
```

>From 2db50fb38a33b5906ba5ba58d286b9d17202b4c2 Mon Sep 17 00:00:00 2001
From: Joel Wee <joelwee at google.com>
Date: Fri, 30 Aug 2024 12:22:29 +0000
Subject: [PATCH] Fix for b6603e1bf1

This fixes the error from the LatticeAnchor PointerUnion with ProgramPoint
third_party/llvm/llvm-project/llvm/include/llvm/ADT/PointerIntPair.h:172:17: error: static assertion failed due to requirement '2U <= PointerUnionUIntTraits<mlir::GenericLatticeAnchor *, mlir::ProgramPoint, mlir::Value>::NumLowBitsAvailable': PointerIntPair with integer size too large for pointer
  172 |   static_assert(IntBits <= PtrTraits::NumLowBitsAvailable,
---
 mlir/include/mlir/IR/Block.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mlir/include/mlir/IR/Block.h b/mlir/include/mlir/IR/Block.h
index e4fddfcb7608e6..67825eb1704bbe 100644
--- a/mlir/include/mlir/IR/Block.h
+++ b/mlir/include/mlir/IR/Block.h
@@ -27,8 +27,8 @@ template <typename ValueRangeT>
 class ValueTypeRange;
 
 /// `Block` represents an ordered list of `Operation`s.
-class Block : public IRObjectWithUseList<BlockOperand>,
-              public llvm::ilist_node_with_parent<Block, Region> {
+class alignas(8) Block : public IRObjectWithUseList<BlockOperand>,
+                         public llvm::ilist_node_with_parent<Block, Region> {
 public:
   explicit Block() = default;
   ~Block();



More information about the Mlir-commits mailing list