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] Merge to trunk from Graphite branch


On Tue, Mar 16, 2010 at 17:26, Dominique Dhumieres <dominiq@lps.ens.fr> wrote:
> With the following patch on top of r157496
>
> diff -up /opt/gcc/_clean/gcc/passes.c /opt/gcc/p_work/gcc/passes.c
> --- /opt/gcc/_clean/gcc/passes.c ? ? ? ?2010-02-22 15:28:45.000000000 +0100
> +++ /opt/gcc/p_work/gcc/passes.c ? ? ? ?2010-03-16 21:28:43.000000000 +0100
> @@ -885,6 +885,7 @@ init_optimization_passes (void)
> ? ? ? ?{
> ? ? ? ? ?struct opt_pass **p = &pass_tree_loop.pass.sub;
> ? ? ? ? ?NEXT_PASS (pass_tree_loop_init);
> + ? ? ? ? /* NEXT_PASS (pass_lim); */
> ? ? ? ? ?NEXT_PASS (pass_copy_prop);
> ? ? ? ? ?NEXT_PASS (pass_dce_loop);
> ? ? ? ? ?NEXT_PASS (pass_lim);
> @@ -897,6 +898,7 @@ init_optimization_passes (void)
> ? ? ? ? ?NEXT_PASS (pass_graphite_transforms);
> ? ? ? ? ? ?{
> ? ? ? ? ? ? ?struct opt_pass **p = &pass_graphite_transforms.pass.sub;
> + ? ? ? ? ? ? NEXT_PASS (pass_copy_prop);
> ? ? ? ? ? ? ?NEXT_PASS (pass_dce_loop);
> ? ? ? ? ? ? ?NEXT_PASS (pass_lim);
> ? ? ? ? ? ?}
> diff -up /opt/gcc/_clean/gcc/tree-ssa-loop-manip.c /opt/gcc/p_work/gcc/tree-ssa-loop-manip.c
> --- /opt/gcc/_clean/gcc/tree-ssa-loop-manip.c ? 2009-11-25 18:20:33.000000000 +0100
> +++ /opt/gcc/p_work/gcc/tree-ssa-loop-manip.c ? 2010-03-16 20:10:04.000000000 +0100
> @@ -1215,9 +1215,9 @@ canonicalize_loop_ivs (struct loop *loop
> ? ? ? ?gsi_insert_seq_on_edge_immediate (loop_preheader_edge (loop), stmts);
> ? ? }
>
> - ?gsi = gsi_last_bb (loop->latch);
> + ?gsi = gsi_last_bb (loop->header);
> ? create_iv (build_int_cst_type (type, 0), build_int_cst (type, 1), NULL_TREE,
> - ? ? ? ? ? ?loop, &gsi, true, &var_before, NULL);
> + ? ? ? ? ? ?loop, &gsi, false, &var_before, NULL);
>
> ? rewrite_all_phi_nodes_with_iv (loop, var_before);
>
> I get
>
> [macbook] lin/test% gfcp -O3 -ffast-math gas_dyn.f90 -ftree-vectorizer-verbose=2 -fgraphite-identity > & tmp1
> [macbook] lin/test% grep VECTORIZED tmp1 | wc
> ? ? ?33 ? ? 132 ? ?1345
>
> Sebastian are you sure that you don't have other patches
> in your build?

On trunk 157499 I also see the exact same thing:

$ grep "LOOP VECTORIZED" before.txt | wc
     24      96    1848

$ grep "LOOP VECTORIZED" after.txt | wc  # changes to canonicalize_loop_ivs
     26     104    2001

$ grep "LOOP VECTORIZED" after1.txt | wc # add pass_copy_prop
     33     132    2533

Also on the Graphite branch I tried to disable all the loop transforms
that could have added more loops, but I get the same thing:

$ ./f951 -O3 -ffast-math -ftree-vectorizer-verbose=2
-fgraphite-identity -fno-loop-block -fno-loop-interchange
-fno-loop-strip-mine -fno-graphite gas_dyn.f90 &> after1.txt
$ grep "LOOP VECTORIZED" after1.txt | wc
     40     160    3065

$ ./f951 -O3 -ffast-math -ftree-vectorizer-verbose=2
-fno-graphite-identity -fno-loop-block -fno-loop-interchange
-fno-loop-strip-mine -fno-graphite
~/gcc/bench/pb05/lin/source/gas_dyn.f90 &> after2.txt
$ grep "LOOP VECTORIZED" after2.txt | wc
     41     164    3142

I will look at the diff between the Graphite branch and trunk to see
why we have this difference.

Sebastian


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