File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -3709,18 +3709,16 @@ class VPlan {
37093709 // / yet) for \p V.
37103710 VPValue *getOrAddLiveIn (Value *V) {
37113711 assert (V && " Trying to get or add the VPValue of a null Value" );
3712- if (!Value2VPValue.count (V)) {
3712+ auto [It, Inserted] = Value2VPValue.try_emplace (V);
3713+ if (Inserted) {
37133714 VPValue *VPV = new VPValue (V);
37143715 VPLiveInsToFree.push_back (VPV);
37153716 assert (VPV->isLiveIn () && " VPV must be a live-in." );
3716- assert (!Value2VPValue.count (V) && " Value already exists in VPlan" );
3717- Value2VPValue[V] = VPV;
3717+ It->second = VPV;
37183718 }
37193719
3720- assert (Value2VPValue.count (V) && " Value does not exist in VPlan" );
3721- assert (Value2VPValue[V]->isLiveIn () &&
3722- " Only live-ins should be in mapping" );
3723- return Value2VPValue[V];
3720+ assert (It->second ->isLiveIn () && " Only live-ins should be in mapping" );
3721+ return It->second ;
37243722 }
37253723
37263724 // / Return the live-in VPValue for \p V, if there is one or nullptr otherwise.
You can’t perform that action at this time.
0 commit comments