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

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


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-core

@llvm/pr-subscribers-mlir

Author: None (JoelWee)

<details>
<summary>Changes</summary>

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,
```

---
Full diff: https://github.com/llvm/llvm-project/pull/106717.diff


1 Files Affected:

- (modified) mlir/include/mlir/IR/Block.h (+2-2) 


``````````diff
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();

``````````

</details>


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


More information about the Mlir-commits mailing list