<div dir="ltr">Clang's -Wpadding may be sort of like what you want.<div><br></div><div>-- Sean Silva</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Sep 7, 2013 at 3:27 PM, Ólafur Waage <span dir="ltr"><<a href="mailto:olafurw@gmail.com" target="_blank">olafurw@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hey,<br><br>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.<br>
<br>Are there any tools within clang/llvm that detect poor data packing in classes?<br>

<br>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)<br>


<br>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.<br>


<br>Cheers,<br>Olafur Waage<br></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>