[PATCH] MC: Skip names of temporary symbols in object streamer

Pete Cooper peter_cooper at apple.com
Wed May 6 12:49:27 PDT 2015


Hi Duncan

The only way I can think for this to impact code would be if a temp label was going to clash with an existing label.  So if i had (inline?) assembly code with Ltmp0, then the first temp label you would currently try to get would attempt to be Ltmp0, fail because that exists, then move on to Ltmp1, and so on.

But this is something the code can already handle, and I don’t believe it will be impacted in terms of correctness by your patch.

So LGTM.

Cheers,
Pete
> On May 6, 2015, at 12:36 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
> 
> Don't create names for temporary symbols when using an object streamer.
> The names never make it to the output anyway.  From the starting point
> of r236629, my heap profile says this drops peak memory usage from 1100
> MB to 1058 MB for CodeGen of `verify-uselistorder`, a savings of almost
> 4% on peak memory, and removes `StringMap<bool, BumpPtrAllocator...>`
> from the profile entirely.
> 
> (I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
> see r236629 for details of what I'm measuring.)
> 
> This patch is pretty simple (and all the tests pass), but I'm not
> entirely sure this is the best way to layer things.  I also haven't
> found a reasonable way to test this (probably there just isn't one).
> 
> <0001-MC-Skip-names-of-temporary-symbols-in-object-streame.patch>





More information about the llvm-commits mailing list