File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -510,8 +510,8 @@ void MemorySlotPromoter::computeReachingDefInRegion(Region *region,
510
510
// / Gets or creates a block index mapping for `region`.
511
511
static const DenseMap<Block *, size_t > &
512
512
getOrCreateBlockIndices (BlockIndexCache &blockIndexCache, Region *region) {
513
- auto [it, created ] = blockIndexCache.try_emplace (region);
514
- if (!created )
513
+ auto [it, inserted ] = blockIndexCache.try_emplace (region);
514
+ if (!inserted )
515
515
return it->second ;
516
516
517
517
DenseMap<Block *, size_t > &blockIndices = it->second ;
@@ -631,8 +631,9 @@ LogicalResult mlir::tryToPromoteMemorySlots(
631
631
Mem2RegStatistics statistics) {
632
632
bool promotedAny = false ;
633
633
634
- // Cache for block index maps. This is required to avoid expensive
635
- // recomputations.
634
+ // A cache that stores deterministic block indices which are used to determine
635
+ // a valid operation modification order. The block index maps are computed
636
+ // lazily and cached to avoid expensive recomputation.
636
637
BlockIndexCache blockIndexCache;
637
638
638
639
for (PromotableAllocationOpInterface allocator : allocators) {
You can’t perform that action at this time.
0 commit comments