[Mlir-commits] [mlir] [MLIR] Add single definition multiple regions for mem2reg (PR #89107)
Christian Ulmann
llvmlistbot at llvm.org
Thu Apr 18 08:06:46 PDT 2024
================
@@ -297,14 +313,52 @@ LogicalResult MemorySlotPromotionAnalyzer::computeBlockingUses(
}
}
- // Because this pass currently only supports analysing the parent region of
- // the slot pointer, if a promotable memory op that needs promotion is outside
- // of this region, promotion must fail because it will be impossible to
- // provide a valid `reachingDef` for it.
- for (auto &[toPromote, _] : userToBlockingUses)
+ // The define uses web only have one definition, It is the potential case.
+ totalStores != 1 ? singleDefining.setPointer(nullptr) : (void)0;
+
+ // The single definition can not dominate all of the uses, there are some
+ // uses need default value and block arguments. But current dominate
+ // frontier algorithms only support single region, so failed.
+ auto leagelSingleDefiningMultiRegions = [this](BlockingUsesMap &userMap) {
----------------
Dinistro wrote:
Nit: Typo in the name.
https://github.com/llvm/llvm-project/pull/89107
More information about the Mlir-commits
mailing list