This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: optimizations
- From: "Bonzini" <bonzini at gnu dot org>
- To: <gcc at gcc dot gnu dot org>,<gcc-help at gcc dot gnu dot org>
- Cc: <reza at linisoft dot com>
- Date: Wed, 15 Jan 2003 19:42:51 +0100
- Subject: Re: optimizations
> > Could you please also tell me if 3.3 and 3.4 remove the extra mov's in
and out
> > of %eax. Ideally, there should be no more than 4 instructions in the
critical
> > loop.
>
> .L2:
> movl -4(%ebp), %eax <== still does the load
> cmpl $16, %eax
> je .L7
> incl %eax
> movl %eax, -4(%ebp) <== and store
> jmp .L2
> .L7:
>
> For some reason it is not (even with -fnew-ra), but on PPC there
> is no extra load/store.
Instruction counts do not tell the whole story; gcc is simply putting more
pressure on the decoding unit but less pressure on the execution unit (which
otherwise would execute two loads in the `taken' case). Things might be
different if gcc is given other options like -mtune=i386.
|_ _ _ __
|_)(_)| ),'
------- '---