https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71509
--- Comment #8 from rguenther at suse dot de <rguenther at suse dot de> --- On Fri, 15 Mar 2019, luoxhu at cn dot ibm.com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71509 > > Xiong Hu XS Luo <luoxhu at cn dot ibm.com> changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > CC| |guojiufu at gcc dot gnu.org, > | |rguenth at gcc dot gnu.org > > --- Comment #7 from Xiong Hu XS Luo <luoxhu at cn dot ibm.com> --- > Hi Richard, trying to figure out the issue recently, but get some questions > need your help. How is the status of the "proposed simple lowering of bitfield > accesses on GIMPLE", please? There are finished patches in a few variants but all of them show issues in the testsuite, mostly around missed optimizations IIRC. It has been quite some time since I last looked at this but IIRC Andrew Pinski said he's got sth for GCC 10 so you might want to ask him. > for "less conservative about DECL_BIT_FIELD_REPRESENTATIVE", do you mean we > choose large mode in GIMPLE stage, and make the decision when in target? > Thanks. DECL_BIT_FIELD_REPRESENTATIVE was mainly added for strict volatile bitfield accesses as well as to avoid data races as specified by the C++ memory model. So in some cases we might be able to widen the accesses (and we can shorten them in any case if we compute this is a good idea). > PS: As a newbie, can you tell how did you do to "Widening the representative" > :), I am a bit confused about the best mode and where to process it, > sometimes > big mode is better and sometimes smaller mode is better(from Segher's > comments). Yeah, get_best_mode is a big pile of *** and this issue is very hard to compute locally. I suppose for the best decision you'd need to look at the whole program (or at least the whole function) in a flow-sensitive manner. One of the lowering tries I did was to integrate the lowering with the SRA pass which is said to eventually get flow-sensitive analysis at some point (but at least does whole-function analysis already).