We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95202ab commit a754bc2Copy full SHA for a754bc2
llvm/lib/CodeGen/RDFLiveness.cpp
@@ -603,11 +603,8 @@ void Liveness::computePhiInfo() {
603
for (NodeAddr<DefNode *> D : Ds) {
604
if (D.Addr->getFlags() & NodeAttrs::PhiRef) {
605
NodeId RP = D.Addr->getOwner(DFG).Id;
606
- std::map<NodeId, RegisterAggr> &M = PhiUp[PUA.Id];
607
- auto F = M.find(RP);
608
- if (F == M.end())
609
- M.insert(std::make_pair(RP, DefRRs));
610
- else
+ auto [F, Inserted] = PhiUp[PUA.Id].try_emplace(RP, DefRRs);
+ if (!Inserted)
611
F->second.insert(DefRRs);
612
}
613
DefRRs.insert(D.Addr->getRegRef(DFG));
0 commit comments