[PATCH] D54382: [llvm-exegesis] Analysis::writeSnippet(): be smarter about memory allocations.

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 19 01:58:39 PST 2018


courbet accepted this revision.
courbet added a comment.

In https://reviews.llvm.org/D54382#1294804, @lebedev.ri wrote:

> In https://reviews.llvm.org/D54382#1294788, @MaskRay wrote:
>
> > > // FIXME: magic number.
> >
> > The owner should give you a reasonable capacity :)
>
>
> I will double-check later, but i think it is sufficient to avoid allocations here
>  for any single instruction (including it's operands).
>  (i.e. `InstPrinterStr` shouldn't ever need to be heap-allocated.)


Yep, SGTM.


Repository:
  rL LLVM

https://reviews.llvm.org/D54382





More information about the llvm-commits mailing list