junrushao1994 commented on a change in pull request #9871:
URL: https://github.com/apache/tvm/pull/9871#discussion_r780598498



##########
File path: src/tir/schedule/state.cc
##########
@@ -201,9 +201,8 @@ class BlockInfoCollector : private StmtVisitor {
     bool is_root_block = srefs_.empty();
     // Calculate `BlockInfo::scope`
     Array<StmtSRef> child_block_srefs = std::move(block_frames_.back());
-    BlockInfo& info =
-        self_->block_info.emplace(scope_root, 
BlockInfo(BlockScope(child_block_srefs)))
-            .first->second;
+    self_->block_info[scope_root] = BlockInfo(BlockScope(child_block_srefs));
+    BlockInfo& info = self_->block_info[scope_root];

Review comment:
       Oh I see - that makes sense to me! Then to save one look-up, let's do
   
   ```suggestion
       BlockInfo& info = self_->block_info[scope_root] = 
BlockInfo(BlockScope(child_block_srefs));
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to