Fwd: [PATCH] Remove copies of MCSubtargetInfo from MCRelaxableFragment

Akira Hatanaka via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 4 12:21:01 PST 2015


Forward my email to the new llvm-commits mailing list.

---------- Forwarded message ----------
From: Akira Hatanaka <ahatanak at gmail.com>
Date: Wed, Nov 4, 2015 at 12:19 PM
Subject: Re: [PATCH] Remove copies of MCSubtargetInfo from
MCRelaxableFragment
To: "Duncan P. N. Exon Smith" <dexonsmith at apple.com>, Rafael Ávila de
Espíndola <rafael.espindola at gmail.com>, Eric Christopher <echristo at gmail.com
>
Cc: llvm-commits <llvm-commits at cs.uiuc.edu>


I've submitted a new patch for review that removes the copy of
MCSubtargetInfo in MCRelaxableFragment and replaces it with a const
reference:

http://reviews.llvm.org/D14346

On Wed, Jul 8, 2015 at 5:30 PM, Duncan P. N. Exon Smith <
dexonsmith at apple.com> wrote:

> Last I checked my `-g -flto` workload, `MCRelaxableFragment` was taking
> up 4.7% of the heap during LTO.  Since these aren't debug info related,
> the relative cost is even higher without `-g` (I figure 10% or so?).
> The struct layout contained a shock: over half of
> `sizeof(MCRelaxableFragment)` comes from a local copy (!?) of
> `MCSubtargetInfo`.
>
> It was more roundabout than I expected to fix, but this patch series
> does it.  0001 removes the copy of `MCSchedModel` from
> `MCSubtargetInfo`, 0002-0004 change the `MCSubtargetInfo` API to prove
> that only the feature bits get mutated, and 0005 moves the copies of
> `MCSubtargetInfo` to a cache in `MCContext`.
>
> I'd love a pre-commit sanity check from someone for two of these:
>   - 0001 (the object for `MCSchedModel::GetDefaultMCSubtarget()` doesn't
>     need to be defined in the header for some reason, does it?) and
>   - 0003 (I'm touching *all* the targets...)
>
> and I've provided the rest of the series (and a combined all.patch) for
> context.
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151104/6c54d7ca/attachment.html>


More information about the llvm-commits mailing list