vinx13 commented on a change in pull request #9871:
URL: https://github.com/apache/tvm/pull/9871#discussion_r780598226
##########
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:
`emplace` will not overwrite the old entry if the key exists. This
function may be called in `UpdateScopeBlockInfo`
--
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]