@@ -92,19 +92,18 @@ class UnrollState {
92
92
void addRecipeForPart (VPRecipeBase *OrigR, VPRecipeBase *CopyR,
93
93
unsigned Part) {
94
94
for (const auto &[Idx, VPV] : enumerate(OrigR->definedValues ())) {
95
- const auto &[V, _] = VPV2Parts.try_emplace ( VPV, SmallVector<VPValue *>() );
96
- assert (V ->second .size () == Part - 1 && " earlier parts not set" );
97
- V ->second .push_back (CopyR->getVPValue (Idx));
95
+ auto Ins = VPV2Parts.insert ({ VPV, {}} );
96
+ assert (Ins. first ->second .size () == Part - 1 && " earlier parts not set" );
97
+ Ins. first ->second .push_back (CopyR->getVPValue (Idx));
98
98
}
99
99
}
100
100
101
101
// / Given a uniform recipe \p R, add it for all parts.
102
102
void addUniformForAllParts (VPSingleDefRecipe *R) {
103
- const auto &[V, Inserted] =
104
- VPV2Parts.try_emplace (R, SmallVector<VPValue *>());
105
- assert (Inserted && " uniform value already added" );
103
+ auto Ins = VPV2Parts.insert ({R, {}});
104
+ assert (Ins.second && " uniform value already added" );
106
105
for (unsigned Part = 0 ; Part != UF; ++Part)
107
- V ->second .push_back (R);
106
+ Ins. first ->second .push_back (R);
108
107
}
109
108
110
109
bool contains (VPValue *VPV) const { return VPV2Parts.contains (VPV); }
0 commit comments