[llvm] c230138 - [SelectionDAG,TableGen] Use MapVector after #73310
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 11 19:14:53 PST 2024
Author: Fangrui Song
Date: 2024-01-11T19:14:49-08:00
New Revision: c230138011cbf07ad7caf9d256ae9d0c5032a974
URL: https://github.com/llvm/llvm-project/commit/c230138011cbf07ad7caf9d256ae9d0c5032a974
DIFF: https://github.com/llvm/llvm-project/commit/c230138011cbf07ad7caf9d256ae9d0c5032a974.diff
LOG: [SelectionDAG,TableGen] Use MapVector after #73310
Otherwise `ComplexPatternList` order can be non-deterministic.
Added:
Modified:
llvm/utils/TableGen/DAGISelMatcherEmitter.cpp
Removed:
################################################################################
diff --git a/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp b/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp
index 4af136df974f05..0c2172063d2ba9 100644
--- a/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp
+++ b/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp
@@ -85,7 +85,7 @@ class MatcherTableEmitter {
MatcherTableEmitter(const Matcher *TheMatcher, const CodeGenDAGPatterns &cgp)
: CGP(cgp), OpcodeCounts(Matcher::HighestKind + 1, 0) {
// Record the usage of ComplexPattern.
- DenseMap<const ComplexPattern *, unsigned> ComplexPatternUsage;
+ MapVector<const ComplexPattern *, unsigned> ComplexPatternUsage;
// Record the usage of PatternPredicate.
std::map<StringRef, unsigned> PatternPredicateUsage;
More information about the llvm-commits
mailing list