File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
llvm/include/llvm/Analysis Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -748,12 +748,11 @@ class InterleavedAccessInfo {
748748 // / \returns the newly created interleave group.
749749 InterleaveGroup<Instruction> *
750750 createInterleaveGroup (Instruction *Instr, int Stride, Align Alignment) {
751- assert (!InterleaveGroupMap.count (Instr) &&
752- " Already in an interleaved access group" );
753- InterleaveGroupMap[Instr] =
754- new InterleaveGroup<Instruction>(Instr, Stride, Alignment);
755- InterleaveGroups.insert (InterleaveGroupMap[Instr]);
756- return InterleaveGroupMap[Instr];
751+ auto [It, Inserted] = InterleaveGroupMap.try_emplace (Instr);
752+ assert (Inserted && " Already in an interleaved access group" );
753+ It->second = new InterleaveGroup<Instruction>(Instr, Stride, Alignment);
754+ InterleaveGroups.insert (It->second );
755+ return It->second ;
757756 }
758757
759758 // / Release the group and remove all the relationships.
You can’t perform that action at this time.
0 commit comments