[PATCH] D27960: Use exact vector capacities to store DWARF line tables
Simon Que via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 19 17:09:39 PST 2016
sque added a comment.
mehdi_amini asked: "Isn't there a way to `reserve()` appropriately initially?"
Not trivially. Look at the while loop that precedes the new code. It looks through the line table but doesn't know beforehand how many Rows there are.
One possible optimization is to first have a dry-run that counts the number of Rows, reserves memory for them, and then runs through again to create the Rows.
https://reviews.llvm.org/D27960
More information about the llvm-commits
mailing list