Schedule a copy_prop pass before graphite.
2010-06-15 Sebastian Pop <sebastian.pop@amd.com> * passes.c (init_optimization_passes): Add pass_graphite. Schedule a pass_copy_prop before pass_graphite_transforms. * timevar.def (TV_GRAPHITE): Declared. * tree-pass.h (pass_graphite): Declared. * tree-ssa-loop.c (pass_graphite): New. * gcc.dg/graphite/id-20.c: New. From-SVN: r163120
This commit is contained in:
parent
14d0e129cc
commit
d4332d0017
8 changed files with 74 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
|||
2010-08-02 Sebastian Pop <sebastian.pop@amd.com>
|
||||
|
||||
* passes.c (init_optimization_passes): Add pass_graphite.
|
||||
Schedule a pass_copy_prop before pass_graphite_transforms.
|
||||
* timevar.def (TV_GRAPHITE): Declared.
|
||||
* tree-pass.h (pass_graphite): Declared.
|
||||
* tree-ssa-loop.c (pass_graphite): New.
|
||||
|
||||
2010-08-02 Sebastian Pop <sebastian.pop@amd.com>
|
||||
|
||||
* graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
2010-06-15 Sebastian Pop <sebastian.pop@amd.com>
|
||||
|
||||
* passes.c (init_optimization_passes): Add pass_graphite.
|
||||
Schedule a pass_copy_prop before pass_graphite_transforms.
|
||||
* timevar.def (TV_GRAPHITE): Declared.
|
||||
* tree-pass.h (pass_graphite): Declared.
|
||||
* tree-ssa-loop.c (pass_graphite): New.
|
||||
|
||||
* gcc.dg/graphite/id-20.c: New.
|
||||
|
||||
2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
|
||||
|
||||
* graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
|
||||
|
|
|
@ -900,9 +900,12 @@ init_optimization_passes (void)
|
|||
NEXT_PASS (pass_check_data_deps);
|
||||
NEXT_PASS (pass_loop_distribution);
|
||||
NEXT_PASS (pass_linear_transform);
|
||||
NEXT_PASS (pass_graphite_transforms);
|
||||
NEXT_PASS (pass_copy_prop);
|
||||
NEXT_PASS (pass_graphite);
|
||||
{
|
||||
struct opt_pass **p = &pass_graphite_transforms.pass.sub;
|
||||
struct opt_pass **p = &pass_graphite.pass.sub;
|
||||
NEXT_PASS (pass_copy_prop);
|
||||
NEXT_PASS (pass_graphite_transforms);
|
||||
NEXT_PASS (pass_copy_prop);
|
||||
NEXT_PASS (pass_dce_loop);
|
||||
NEXT_PASS (pass_lim);
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2010-08-02 Sebastian Pop <sebastian.pop@amd.com>
|
||||
|
||||
* gcc.dg/graphite/id-20.c: New.
|
||||
|
||||
2010-08-11 Janus Weil <janus@gcc.gnu.org>
|
||||
Steve Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
|
|
26
gcc/testsuite/gcc.dg/graphite/id-20.c
Normal file
26
gcc/testsuite/gcc.dg/graphite/id-20.c
Normal file
|
@ -0,0 +1,26 @@
|
|||
/* { dg-options "-O3 -fgraphite-identity -ffast-math" } */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
I_SLICE,
|
||||
} SliceType;
|
||||
typedef struct
|
||||
{
|
||||
int type;
|
||||
} ImageParameters;
|
||||
extern ImageParameters *img;
|
||||
int A[64], B[64], C[13][8][8], D[13][8][8];
|
||||
|
||||
void
|
||||
foo (int q, int temp)
|
||||
{
|
||||
int i, j, k;
|
||||
for(k=0; k<13; k++)
|
||||
for(j=0; j<8; j++)
|
||||
for(i=0; i<8; i++)
|
||||
{
|
||||
if (img->type == I_SLICE)
|
||||
C[k][j][i] = A[temp] << q;
|
||||
D[k][j][i] = B[temp] << q;
|
||||
}
|
||||
}
|
|
@ -146,6 +146,7 @@ DEFTIMEVAR (TV_COMPLETE_UNROLL , "complete unrolling")
|
|||
DEFTIMEVAR (TV_TREE_PARALLELIZE_LOOPS, "tree parallelize loops")
|
||||
DEFTIMEVAR (TV_TREE_VECTORIZATION , "tree vectorization")
|
||||
DEFTIMEVAR (TV_TREE_SLP_VECTORIZATION, "tree slp vectorization")
|
||||
DEFTIMEVAR (TV_GRAPHITE , "Graphite")
|
||||
DEFTIMEVAR (TV_GRAPHITE_TRANSFORMS , "Graphite loop transforms")
|
||||
DEFTIMEVAR (TV_GRAPHITE_DATA_DEPS , "Graphite data dep analysis")
|
||||
DEFTIMEVAR (TV_GRAPHITE_CODE_GEN , "Graphite code generation")
|
||||
|
|
|
@ -373,6 +373,7 @@ extern struct gimple_opt_pass pass_iv_canon;
|
|||
extern struct gimple_opt_pass pass_scev_cprop;
|
||||
extern struct gimple_opt_pass pass_empty_loop;
|
||||
extern struct gimple_opt_pass pass_record_bounds;
|
||||
extern struct gimple_opt_pass pass_graphite;
|
||||
extern struct gimple_opt_pass pass_graphite_transforms;
|
||||
extern struct gimple_opt_pass pass_if_conversion;
|
||||
extern struct gimple_opt_pass pass_loop_distribution;
|
||||
|
|
|
@ -310,6 +310,25 @@ gate_graphite_transforms (void)
|
|||
return flag_graphite != 0;
|
||||
}
|
||||
|
||||
struct gimple_opt_pass pass_graphite =
|
||||
{
|
||||
{
|
||||
GIMPLE_PASS,
|
||||
"graphite0", /* name */
|
||||
gate_graphite_transforms, /* gate */
|
||||
NULL, /* execute */
|
||||
NULL, /* sub */
|
||||
NULL, /* next */
|
||||
0, /* static_pass_number */
|
||||
TV_GRAPHITE, /* tv_id */
|
||||
PROP_cfg | PROP_ssa, /* properties_required */
|
||||
0, /* properties_provided */
|
||||
0, /* properties_destroyed */
|
||||
0, /* todo_flags_start */
|
||||
0 /* todo_flags_finish */
|
||||
}
|
||||
};
|
||||
|
||||
struct gimple_opt_pass pass_graphite_transforms =
|
||||
{
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue