diff options
author | Fangrui Song <i@maskray.me> | 2024-06-19 17:21:22 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2024-06-19 17:21:22 -0700 |
commit | c025bd1fdbbdbe76c450eb08ebd8649fb3179d5a (patch) | |
tree | b9aabc9fb315f0ba121e9e4dd7ce3a4e274dcf9b /llvm | |
parent | 6d340e4c448c14b7103fddfec7d429b9d535611d (diff) | |
download | llvm-c025bd1fdbbdbe76c450eb08ebd8649fb3179d5a.zip llvm-c025bd1fdbbdbe76c450eb08ebd8649fb3179d5a.tar.gz llvm-c025bd1fdbbdbe76c450eb08ebd8649fb3179d5a.tar.bz2 |
[TableGen,GlobalISel] Use MapVector to stabilize iteration order
Otherwise llvm/test/TableGen/GlobalISelCombinerEmitter/type-inference.td
could fail when llvm::hash_value(StringRef) changes.
Fix #66377
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp b/llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp index 085841e..e8fbaed 100644 --- a/llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp +++ b/llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp @@ -529,7 +529,7 @@ void CombineRuleOperandTypeChecker::getInstEqClasses( const auto MCOITypes = getMCOIOperandTypes(*CGP); assert(MCOITypes.size() == P.operands_size()); - DenseMap<StringRef, std::vector<unsigned>> TyToOpIdx; + MapVector<StringRef, SmallVector<unsigned, 0>> TyToOpIdx; for (const auto &[Idx, Ty] : enumerate(MCOITypes)) TyToOpIdx[Ty].push_back(Idx); |