[Mlir-commits] [mlir] [mlir] Simplify code with MapVector::operator[] (NFC) (PR #113407)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Oct 22 20:03:26 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/113407.diff
1 Files Affected:
- (modified) mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp (+1-1)
``````````diff
diff --git a/mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp b/mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp
index fe27a22294914e..dab15d23f6e0f5 100644
--- a/mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp
+++ b/mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp
@@ -818,7 +818,7 @@ std::unique_ptr<MatcherNode> &getOrCreateChild(SwitchNode *node,
auto it = predicate->patternToAnswer.find(pattern);
assert(it != predicate->patternToAnswer.end() &&
"expected pattern to exist in predicate");
- return node->getChildren().insert({it->second, nullptr}).first->second;
+ return node->getChildren()[it->second];
}
/// Build the matcher CFG by "pushing" patterns through by sorted predicate
``````````
</details>
https://github.com/llvm/llvm-project/pull/113407
More information about the Mlir-commits
mailing list