using emplace

This commit is contained in:
caheckman 2021-01-07 14:36:10 -05:00
parent 3644c120c0
commit 5f715d73e3
34 changed files with 101 additions and 103 deletions

View file

@ -729,7 +729,7 @@ TraceDAG::BlockTrace *TraceDAG::selectBadEdge(void)
if ((*aiter)->isTerminal()) continue;
if (((*aiter)->top->top == (FlowBlock *)0)&&((*aiter)->bottom==(FlowBlock *)0))
continue; // Never remove virtual edges
badedgelist.push_back(BadEdgeScore());
badedgelist.emplace_back();
BadEdgeScore &score( badedgelist.back() );
score.trace = *aiter;
score.exitproto = score.trace->destnode;
@ -1125,7 +1125,7 @@ void CollapseStructure::labelLoops(vector<LoopBody *> &looporder)
for(int4 j=0;j<sizein;++j) {
if (bl->isBackEdgeIn(j)) { // back-edge coming in must be from the bottom of a loop
FlowBlock *loopbottom = bl->getIn(j);
loopbody.push_back(LoopBody(bl));
loopbody.emplace_back(bl);
LoopBody &curbody( loopbody.back() );
curbody.addTail(loopbottom);
looporder.push_back( & curbody );