[cfe-dev] Detection of poor data layout / packing.
Sean Silva
silvas at purdue.edu
Sat Sep 7 14:04:13 PDT 2013
Clang's -Wpadding may be sort of like what you want.
-- Sean Silva
On Sat, Sep 7, 2013 at 3:27 PM, Ólafur Waage <olafurw at gmail.com> wrote:
> Hey,
>
> I asked about this a while back but got no answers. And after seeing the
> GN talks and specially also after watching Andrei talking about data layout
> I'm tempted to ask again.
>
> Are there any tools within clang/llvm that detect poor data packing in
> classes?
>
> I saw that there exist some flags that can print out the current data
> structure and the memory offset of each member variable. But it seemed not
> to work that well given anything else outside of some testing code and
> trying to parse it seemed to be hard (but not impossible)
>
> Would it make sense to try to have a tool or in some way emit the
> structure and point out places where packing could be improved? If it
> would, and no tool exists, I would be interested in helping out or doing
> something on my own.
>
> Cheers,
> Olafur Waage
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130907/7e832820/attachment.html>
More information about the cfe-dev
mailing list