This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Don't completely scalarize a record if it contains bit-field (PR tree-optimization/45144)


On 07/31/2010 01:53 AM, Jakub Jelinek wrote:
On Fri, Jul 30, 2010 at 10:11:42AM -0700, Mark Mitchell wrote:
To me, Jie's change seems like a plausible heuristic within the current
infrastructure.  I'm all for building new infrastructure when
possible/necessary, but I don't think we should prevent these kinds of
tweaks to heuristics just because we can think of another way of doing
things.  To me, the question ought to be "does this make the compiler
better for users?"

I wouldn't call it tweak to heuristics, it looks to me like an ugly hack. In many cases the SRA of bitfields is very desirable, especially for apps that use bitfields heavily like Linux kernel. I remember Alex spending quite some time improving SRA to handle bitfields more efficiently, and this hack just disables it altogether.

My patch does not disable SRA of bit-fields. It's an adjust of the tweak for PR 42585. It's only disable total scalarization of small records containing bit-fields. As you said below, it's difficult for RTL combiner to combine the scalarized bit-fields again. So we'd better to avoid total scalarizing it. If the bit-fields are accessed explicitly in the IL, SRA still works as in usual way.

As my reply to Mark's email, my patch does not change the final assembly of linux kernel, at least for 2.6.34.1 with the default configuration of x86_64.


Regards, -- Jie Zhang CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]