[Mlir-commits] [mlir] [MLIR] Add single definition multiple regions for mem2reg (PR #89107)

Christian Ulmann llvmlistbot at llvm.org
Thu Apr 18 08:06:45 PDT 2024


================
@@ -156,6 +159,11 @@ class MemorySlotPromotionAnalyzer {
   MemorySlot slot;
   DominanceInfo &dominance;
   const DataLayout &dataLayout;
+
+  /// If there is only one defining operation for the current slot, will save
+  /// this pointer part, otherwise empty. And when meeting the define and uses
+  /// in the same region the `bool` part will been set true, otherwise false.
+  llvm::PointerIntPair<Operation *, 1, bool> singleDefining{};
----------------
Dinistro wrote:

Using a `PointerIntPair` can be quite cumbersome. It might be better to simply split this into two separate members and then to document them individually.

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


More information about the Mlir-commits mailing list