This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Improvements to code hoisting
- From: Maxim Kuvyrkov <maxim at codesourcery dot com>
- To: Richard Guenther <richard dot guenther at gmail dot com>
- Cc: Jeff Law <law at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Date: Thu, 01 Jul 2010 13:00:19 +0400
- Subject: Re: Improvements to code hoisting
- References: <4C18F225.2040509@codesourcery.com> <AANLkTim-S-q3yRs27Aj05b_iKT-i-2doiN-FbhEcY3aj@mail.gmail.com>
On 6/16/10 8:38 PM, Richard Guenther wrote:
On Wed, Jun 16, 2010 at 5:47 PM, Maxim Kuvyrkov<maxim@codesourcery.com> wrote:
The following series of patches improves code hoisting and PRE RTL-level
optimizations. The two threads of the patches correspond to
target-independent changes to gcse.c and to changes to ARM backend to make
it emit RTL that is better suited for optimizers.
Motivating examples for this work are ARM PRs
http://gcc.gnu.org/PR42495
http://gcc.gnu.org/PR42574
With the patches applied GCC produces perfect code for these examples.
...
What is the compile-time effect of the cummulative patch on GCSE time?
The compile-time effect on code hoisting is hard to measure reliably, on
whole of SPEC2K code hoisting takes 1.3-2.6 seconds. In some cases
compile time goes up on others it goes down. Generally, it seems that
the patches make GCC a tiny bit faster, about 0.2%. I attribute this
speedup to cleaning up VBEout sets.
There is no effect on PRE and other GCSE passes as the patches don't
change anything for those.
As to the size reduction, the results are:
ARM non-PIC: -0.2%
ARM PIC: -0.8%
x86 non-PIC: -0.0%
x86 PIC: -0.1%
x64 non-PIC: -0.1%
x64 PIC: -0.2%
The flags used are "-Os -fno-common {-m32/m64}" for x86[_64] and "-Os
-fno-common -mthumb -march={armv5te/armv7-a}" for ARM.
The code size metric is geomean across all object files in SPEC2K.
Regards,
--
Maxim Kuvyrkov
CodeSourcery
maxim@codesourcery.com
(650) 331-3385 x724