|
20 | 20 | #include "GlobalISelMatchTableExecutorEmitter.h"
|
21 | 21 | #include "SubtargetFeatureInfo.h"
|
22 | 22 | #include "llvm/ADT/Hashing.h"
|
| 23 | +#include "llvm/ADT/MapVector.h" |
23 | 24 | #include "llvm/ADT/Statistic.h"
|
24 | 25 | #include "llvm/ADT/StringSet.h"
|
25 | 26 | #include "llvm/Support/CommandLine.h"
|
@@ -552,7 +553,7 @@ class CombineRuleBuilder {
|
552 | 553 | /// Set by findRoots.
|
553 | 554 | Pattern *MatchRoot = nullptr;
|
554 | 555 |
|
555 |
| - StringMap<OperandTableEntry> OperandTable; |
| 556 | + MapVector<StringRef, OperandTableEntry> OperandTable; |
556 | 557 | SmallVector<MatchDataInfo, 2> MatchDatas;
|
557 | 558 | };
|
558 | 559 |
|
@@ -640,9 +641,8 @@ void CombineRuleBuilder::print(raw_ostream &OS) const {
|
640 | 641 | OS << "<empty>)\n";
|
641 | 642 | else {
|
642 | 643 | OS << "\n";
|
643 |
| - for (const auto &Entry : OperandTable) { |
644 |
| - OS << " [" << Entry.getKey(); |
645 |
| - auto &Val = Entry.getValue(); |
| 644 | + for (const auto &[Key, Val] : OperandTable) { |
| 645 | + OS << " [" << Key; |
646 | 646 | if (const auto *P = Val.MatchPat)
|
647 | 647 | OS << " match_pat:" << P->getName();
|
648 | 648 | if (const auto *P = Val.ApplyPat)
|
@@ -1106,7 +1106,7 @@ bool CombineRuleBuilder::emitInstructionMatchPattern(
|
1106 | 1106 |
|
1107 | 1107 | unsigned OpIdx = 0;
|
1108 | 1108 | for (auto &O : P.operands()) {
|
1109 |
| - auto &OpTableEntry = OperandTable.at(O.Name); |
| 1109 | + auto &OpTableEntry = OperandTable.find(O.Name)->second; |
1110 | 1110 |
|
1111 | 1111 | OperandMatcher &OM =
|
1112 | 1112 | IM.addOperand(OpIdx++, O.Name, AllocatedTemporariesBaseID++);
|
|
0 commit comments