<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 13, 2014 at 7:42 PM, Justin Bogner <span dir="ltr"><<a href="mailto:mail@justinbogner.com" target="_blank">mail@justinbogner.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":dpk" class="a3s" style="overflow:hidden">Author: bogner<br>
Date: Wed Aug 13 21:42:10 2014<br>
New Revision: 215614<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=215614&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=215614&view=rev</a><br>
Log:<br>
CodeGen: When bitfields fall on natural boundaries, split them up<br>
<br>
Currently when laying out bitfields that don't need any padding, we<br>
represent them as a wide enough int to contain all of the bits. This<br>
can be hard on the backend since we'll do things like represent stores<br>
to a few bits as loading an i144, masking it with a large constant,<br>
and storing it back.<br>
<br>
This turns up in less pathological cases where we load and mask 64 bit<br>
word on a 32 bit platform when we actually only need to access 32 bits.<br>
This leads to bad code being generated in most of our 32 bit backends.<br>
<br>
In practice, there are often natural breaks in bitfields, and it's a<br>
fairly simple and effective heuristic to split these fields into legal<br>
integer sized chunks when it will be equivalent (ie, it won't force us<br>
to add any extra padding).</div></blockquote></div><div class="gmail_extra"><br></div>Please revert. We used to do this, and I worked very hard to specifically design the system to work the way it does now. There are copious comments, email threads, and discussions where we debated how to handle this and decided to do so in the exact way.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">If you want to re-open the discussion, cool. But please do so as a discussion, and cite specifically why the rationale for using fully-wide loads and stores is inapplicable or causes insurmountable problems.<br>
<br></div></div>