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: PATCH: Add Intel Atom optimization


Hello!

On Tue, Mar 31, 2009 at 1:20 AM, H.J. Lu <hongjiu.lu@intel.com> wrote:

> Changes are mainly in following aspects:
> - Atom instruction selection. For example, using lea or add for add/sub
> operation.
> - Atom pipeline description, mostly in atom.md
> - X86_TUNE flags tuning for Atom
>
> 32-bits performance experiment on Atom box showed following
> ATOM_OPT/BASE_OPT
> speedup:
> CPU2000 INT: 1.03 (which means ATOM_OPT is 3% faster than BASE_OPT)
> CPU2000 FP: 1.06
> EEMBC 1.1: 1.06
> EEMBC 2.0 Consumer: 1.09
>
> BASE_OPT=-m32 -O2 -mfpmath=sse -ffast-math -mssse3
> ATOM_OPT=-m32 -O2 -mfpmath=sse -ffast-math -march=atom
> Passed all test. Based on trunk revision: 143853
>
> There are two approaches to enable Atom specific optimizations. One is
> to use command line option -march=atom or -mtune=atom. Another is
> to use config option --with-arch=atom --with-cpu=atom to enable Atom
> as default.
>
> OK for trunk?

H.J.,

atom.md license header is GPL v2, this should probably be changed to v3.

Other than that, I will just rubber-stamp atom.md and various config
bits, so these are OK for mainline. But please see below for i386.c
part.

>        * config/i386/i386-protos.h (ix86_lea_for_add_ok): Declare new
>        function.
>        (ix86_dep_by_shift_count): Likewise.
>        (ix86_agi_dependent): Likewise.

ix86_agi_dependent functions are not part of this patch, please update
ChangeLog.

>        (distance_non_agu_define): New function.
>        (reg_mentioned_by_mem_p): Likewise.
>        (distance_agu_use): Likewise.
>        (ix86_lea_for_add_ok): Likewise.

please remove above functions from the patch and put them in a
separate follow-up patch. The main problem is with LEA discovery code
(see the comment above distance_non_agu_define). Since this function
is used after reload, we can use get_attr_type function on the insn
RTL. This func will determine, if insn is LEA or not. Also, perhaps
Steven B sees some opportunity to use DF infrastructure here instead
of scanning insn stream every time the function is called.

>        (ix86_dep_by_shift_count): Likewise.

Also with the above function. Please separate this function to a
follow-up patch. Can we use DF here?

>        (ix86_agi_dependent): Make it global.

Not in this patch, please update ChangeLog.

Uros.


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