[PATCH] D87326: [ADT] Fix reference invalidation when self referencing a SmallVector

Nathan James via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 14:13:02 PDT 2020


njames93 added a comment.

In D87326#2265673 <https://reviews.llvm.org/D87326#2265673>, @nikic wrote:

> Here's the compile-time impact I see with this change:
>
> 1.2% regression in instructions retired: https://llvm-compile-time-tracker.com/compare.php?from=3c42c0dcf631ad6b90e718df895c05f79718659f&to=606330864b2349e29beb460ae69fa41c0170674e&stat=instructions
> 1.0% max-rss regression: https://llvm-compile-time-tracker.com/compare.php?from=3c42c0dcf631ad6b90e718df895c05f79718659f&to=606330864b2349e29beb460ae69fa41c0170674e&stat=max-rss
>
> The max-rss regression is presumably due to an increase in clang binary size. Manually checking the data, size-text goes from 80490755 to 81122130, i.e. 0.8% increase.

What build flags are you using. I tried a release build with thinlto. Also tried to move some of this code into the cpp file by type erasing the template out of GrowBufferBase.
For the record I'm testing on a Ryzen 2600X on ubuntu 20.04 and using clang-10 as the host compiler and linking with lld-10

  trunk      - size.text = 42483D6, size.binary = 6141438
  this       - size.text = 3EBD276, size.binary = 5DDD940
  type-erase - size.text = 3EC0B26, size.binary = 5DE1290


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87326/new/

https://reviews.llvm.org/D87326



More information about the llvm-commits mailing list