#include "GlobalISelMatchTableExecutorEmitter.h"
#include "SubtargetFeatureInfo.h"
#include "llvm/ADT/Hashing.h"
+#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/Support/CommandLine.h"
/// Set by findRoots.
Pattern *MatchRoot = nullptr;
- StringMap<OperandTableEntry> OperandTable;
+ MapVector<StringRef, OperandTableEntry> OperandTable;
SmallVector<MatchDataInfo, 2> MatchDatas;
};
OS << "<empty>)\n";
else {
OS << "\n";
- for (const auto &Entry : OperandTable) {
- OS << " [" << Entry.getKey();
- auto &Val = Entry.getValue();
+ for (const auto &[Key, Val] : OperandTable) {
+ OS << " [" << Key;
if (const auto *P = Val.MatchPat)
OS << " match_pat:" << P->getName();
if (const auto *P = Val.ApplyPat)
unsigned OpIdx = 0;
for (auto &O : P.operands()) {
- auto &OpTableEntry = OperandTable.at(O.Name);
+ auto &OpTableEntry = OperandTable.find(O.Name)->second;
OperandMatcher &OM =
IM.addOperand(OpIdx++, O.Name, AllocatedTemporariesBaseID++);