File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed
llvm/lib/Transforms/Scalar Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -52,8 +52,7 @@ static void runImpl(Function &F, const TargetLibraryInfo &TLI) {
52
52
for (Instruction &I : instructions (F)) {
53
53
if (!I.hasMetadata (LLVMContext::MD_annotation))
54
54
continue ;
55
- auto Iter = DebugLoc2Annotated.insert ({I.getDebugLoc ().getAsMDNode (), {}});
56
- Iter.first ->second .push_back (&I);
55
+ DebugLoc2Annotated[I.getDebugLoc ().getAsMDNode ()].push_back (&I);
57
56
58
57
for (const MDOperand &Op :
59
58
I.getMetadata (LLVMContext::MD_annotation)->operands ()) {
@@ -62,8 +61,7 @@ static void runImpl(Function &F, const TargetLibraryInfo &TLI) {
62
61
? cast<MDString>(Op.get ())->getString ()
63
62
: cast<MDString>(cast<MDTuple>(Op.get ())->getOperand (0 ).get ())
64
63
->getString ();
65
- auto Iter = Mapping.insert ({AnnotationStr, 0 });
66
- Iter.first ->second ++;
64
+ Mapping[AnnotationStr]++;
67
65
}
68
66
}
69
67
Original file line number Diff line number Diff line change @@ -2486,8 +2486,7 @@ class LowerMatrixIntrinsics {
2486
2486
if (!ExprsInSubprogram.count (V))
2487
2487
return ;
2488
2488
2489
- auto I = Shared.insert ({V, {}});
2490
- I.first ->second .insert (Leaf);
2489
+ Shared[V].insert (Leaf);
2491
2490
2492
2491
for (Value *Op : cast<Instruction>(V)->operand_values ())
2493
2492
collectSharedInfo (Leaf, Op, ExprsInSubprogram, Shared);
@@ -2538,14 +2537,12 @@ class LowerMatrixIntrinsics {
2538
2537
auto *I = cast<Instruction>(KV.first );
2539
2538
DILocation *Context = I->getDebugLoc ();
2540
2539
while (Context) {
2541
- auto I =
2542
- Subprog2Exprs.insert ({getSubprogram (Context->getScope ()), {}});
2543
- I.first ->second .push_back (KV.first );
2540
+ Subprog2Exprs[getSubprogram (Context->getScope ())].push_back (
2541
+ KV.first );
2544
2542
Context = DebugLoc (Context).getInlinedAt ();
2545
2543
}
2546
2544
} else {
2547
- auto I = Subprog2Exprs.insert ({nullptr , {}});
2548
- I.first ->second .push_back (KV.first );
2545
+ Subprog2Exprs[nullptr ].push_back (KV.first );
2549
2546
}
2550
2547
}
2551
2548
for (auto &KV : Subprog2Exprs) {
You can’t perform that action at this time.
0 commit comments