This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] Correcting the use of emplace_back
ClosedPublic

Authored by wrengr on Aug 24 2021, 3:49 PM.

Details

Summary

The emplace commands are variadic and should take all the constructor arguments directly, since they implicitly call the constructor themselves in order to avoid the cost of constructing and then moving/copying temporaries.

Diff Detail

Event Timeline

wrengr created this revision.Aug 24 2021, 3:49 PM
wrengr requested review of this revision.Aug 24 2021, 3:49 PM
aartbik accepted this revision.Aug 24 2021, 4:09 PM
This revision is now accepted and ready to land.Aug 24 2021, 4:09 PM
wrengr retitled this revision from Correcting the use of emplace_back to [mlir][sparse] Correcting the use of emplace_back.Aug 24 2021, 6:16 PM
This revision was automatically updated to reflect the committed changes.