[patch] Merge to trunk from Graphite branch
Jack Howarth
howarth@bromo.med.uc.edu
Wed Mar 17 04:33:00 GMT 2010
On Tue, Mar 16, 2010 at 11:26:26PM +0100, Dominique Dhumieres 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?
>
> Dominique
Dominique,
Despite the discrepancy, these patches are a real improvement. I did a complete build of xplor-nih 2.25
tonight against gcc trunk with -O3 -ffast-math -funroll-loops on x86_64-apple-darwin10. The benchmarks for
that build compared to one with -fgraphite-identity added are identical. It will be really interesting to see what
the graphite loop optimizations can actually do now that vectorization is being retained.
Jack
More information about the Gcc-patches
mailing list