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 08/03/2010 05:00 PM, Richard Guenther wrote:
On Mon, Aug 2, 2010 at 6:52 PM, Mark Mitchell<mark@codesourcery.com> wrote:
Jie Zhang wrote:

My patch prevents several full scalarizations of records with bit-field
when compiling Linux kernel for x86_64, but none of these causes
differences in final assemblies. I use 2.6.34.1 and the default config
for x86_64. I checked -O2 and -Os.

That seems at odds with the statement made previously in this thread that this optimization was essential for Linux kernel performance.

If Jie's statement is accurate, then, whether or not this is a "hack",
it seems like a win.  I don't see anything wrong with accepting a small,
local improvement that has no user-observable negative impact; we can
always rip it out and replace it with something better when something
better exists.

OTOH no changes in code generation are also not in favor of this patch. Why didn't it improve anything? Or was that expected?

Only two total scalarizations are prevented by my patch when building the linux kernel for the default x86_64 config, which compiles 1646 C files.

One is in io_apic.c:ioapic_write_entry (), "struct IO_APIC_route_entry e".

The other is in fs-writeback.c:bdi_sync_writeback (), "struct wb_writeback_args args".

In both cases, those structs are used simply as a whole. GCC can already optimize away the parts generated by total scalarization. So there is no difference when it's disabled.

Can you adjust the patch according to Martins suggestion?

OK.


Thanks, -- Jie Zhang CodeSourcery


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