@@ -339,7 +339,7 @@ static void appendFoldCandidate(SmallVectorImpl<FoldCandidate> &FoldList,
339
339
return ;
340
340
LLVM_DEBUG (dbgs () << " Append " << (Commuted ? " commuted" : " normal" )
341
341
<< " operand " << OpNo << " \n " << *MI);
342
- FoldList.push_back ( FoldCandidate ( MI, OpNo, FoldOp, Commuted, ShrinkOp) );
342
+ FoldList.emplace_back ( MI, OpNo, FoldOp, Commuted, ShrinkOp);
343
343
}
344
344
345
345
static bool tryAddToFoldList (SmallVectorImpl<FoldCandidate> &FoldList,
@@ -520,7 +520,7 @@ static bool getRegSeqInit(
520
520
Sub = Op;
521
521
}
522
522
523
- Defs.push_back ( std::make_pair ( Sub, Def->getOperand (I + 1 ).getImm () ));
523
+ Defs.emplace_back ( Sub, Def->getOperand (I + 1 ).getImm ());
524
524
}
525
525
526
526
return true ;
@@ -700,9 +700,9 @@ void SIFoldOperands::foldOperand(
700
700
if (Use.isImplicit ())
701
701
continue ;
702
702
703
- FoldCandidate FC = FoldCandidate (Use. getParent (), Use.getParent ()-> getOperandNo (&Use ),
704
- &UseMI-> getOperand ( 1 ));
705
- CopyUses. push_back (FC );
703
+ CopyUses. emplace_back ( Use.getParent (),
704
+ Use. getParent ()-> getOperandNo (&Use),
705
+ &UseMI-> getOperand ( 1 ) );
706
706
}
707
707
for (auto &F : CopyUses) {
708
708
foldOperand (*F.OpToFold , F.UseMI , F.UseOpNo , FoldList, CopiesToReplace);
0 commit comments