diff options
| author | Amir Ayupov <aaupov@fb.com> | 2025-06-08 22:50:59 -0700 |
|---|---|---|
| committer | Amir Ayupov <aaupov@fb.com> | 2025-06-08 22:50:59 -0700 |
| commit | eb1dd48b4ab79e29e82bd396c01b4a7cc83bbd81 (patch) | |
| tree | ad446efb8062977bcf328af58cdc7fcd47864af2 /llvm/utils/TableGen/InstrInfoEmitter.cpp | |
| parent | 81f92265327a8cf6e730ad1d01fd02f4ef76ed86 (diff) | |
| parent | 03bbd04bb7ae40dcda7b8bf1d6d09f63191503b0 (diff) | |
[𝘀𝗽𝗿] changes introduced through rebaseusers/aaupov/spr/main.boltnfci-simplify-dataaggregator-using-traces-1
Created using spr 1.3.4
[skip ci]
Diffstat (limited to 'llvm/utils/TableGen/InstrInfoEmitter.cpp')
| -rw-r--r-- | llvm/utils/TableGen/InstrInfoEmitter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/utils/TableGen/InstrInfoEmitter.cpp b/llvm/utils/TableGen/InstrInfoEmitter.cpp index f240cab040ca..e72055b0b503 100644 --- a/llvm/utils/TableGen/InstrInfoEmitter.cpp +++ b/llvm/utils/TableGen/InstrInfoEmitter.cpp @@ -203,7 +203,7 @@ InstrInfoEmitter::CollectOperandInfo(OperandInfoListTy &OperandInfoList, unsigned Offset = 0; for (const CodeGenInstruction *Inst : Target.getInstructionsByEnumValue()) { OperandInfoTy OperandInfo = GetOperandInfo(*Inst); - if (OperandInfoMap.insert({OperandInfo, Offset}).second) { + if (OperandInfoMap.try_emplace(OperandInfo, Offset).second) { OperandInfoList.push_back(OperandInfo); Offset += OperandInfo.size(); } @@ -503,7 +503,8 @@ void InstrInfoEmitter::emitLogicalOperandSizeMappings( LogicalOpListSize = std::max(LogicalOpList.size(), LogicalOpListSize); auto I = - LogicalOpSizeMap.insert({LogicalOpList, LogicalOpSizeMap.size()}).first; + LogicalOpSizeMap.try_emplace(LogicalOpList, LogicalOpSizeMap.size()) + .first; InstMap[I->second].push_back( (Namespace + "::" + Inst->TheDef->getName()).str()); } @@ -850,7 +851,7 @@ void InstrInfoEmitter::run(raw_ostream &OS) { std::vector<const Record *> ImplicitOps = Inst->ImplicitUses; llvm::append_range(ImplicitOps, Inst->ImplicitDefs); - if (EmittedLists.insert({ImplicitOps, ImplicitListSize}).second) { + if (EmittedLists.try_emplace(ImplicitOps, ImplicitListSize).second) { ImplicitLists.push_back(ImplicitOps); ImplicitListSize += ImplicitOps.size(); } |
