This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Extra invariant motion step after ivopt
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 11 Jul 2011 22:11:28 -0700
- Subject: Re: [PATCH] Extra invariant motion step after ivopt
- References: <20110711085045.GA4003@bart>
On Mon, Jul 11, 2011 at 1:50 AM, Andreas Krebbel
<krebbel@linux.vnet.ibm.com> wrote:
> Hi,
>
> with the changes in the IVopts pass from last year I see a reduced
> number of induction variables used for the first of the 3 hotloops in
> the 436.cactus benchmark:
>
> http://gcc.gnu.org/viewcvs?view=revision&revision=162653
>
> Which leads to an heavily increased number of instructions in the body
> of the first loop in the resulting binary:
>
> with GCC 4.5: BB 4: 52 ?<- number of instructions
> with GCC 4.6: BB 4: 110 <- similiar result with GCC head
>
> With GCC 4.6 a lot of loop invariant integer arithmetic is done in
> order to calculate the addresses which are used to access the array
> fields.
>
> Adding another invariant motion pass improves the loop even beyond the
> 4.5 result:
>
> with GCC 4.6 + attached patch: BB 4: 47
>
> The benchmark result for 436.cactus only improves by about 2% since
> the first loop is not actually the "hottest" in the trio but the code
> is actually much better.
>
> I've not been able to measure the compile time overhead. Out of 10
> measurements compiling the cactus testcase the minimum of the compile
> times was even lower then before. Perhaps having less instructions in
> the loop body made other passes faster. ?Overall I expect a very small
> compile time increase.
>
> Ok for mainline?
>
> Bye,
>
> -Andreas-
>
>
> 2011-07-11 ?Andreas Krebbel ?<Andreas.Krebbel@de.ibm.com>
>
> ? ? ? ?* passes.c (init_optimization_passes): Add invariant motion pass
> ? ? ? ?after induction variable optimization.
>
This may have caused:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49711
--
H.J.