+2011-07-21 Sebastian Pop <sebastian.pop@amd.com>
+
+ * graphite-clast-to-gimple.c (compute_bounds_for_level): Call
+ psct_dynamic_dim.
+ (translate_clast_for_loop): Pass loop level to dependency_in_loop_p.
+ (gcc_type_for_iv_of_clast_loop): Update use of level.
+ (gloog): Start counting nesting level from 0.
+ * graphite-clast-to-gimple.h (get_scattering_level): Removed.
+ * graphite-dependences.c (graphite_carried_dependence_level_k): Call
+ psct_dynamic_dim on level.
+
2011-07-21 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386.c (ix86_legitimize_address): Convert to
+ pbb_dim_iter_domain (pbb) + pbb_nb_params (pbb);
ppl_new_Linear_Expression_with_dimension (&le, dim);
- ppl_set_coef (le, 2 * level + 1, 1);
+ ppl_set_coef (le, psct_dynamic_dim (pbb, level), 1);
}
ppl_max_for_le_pointset (ps, le, up);
return max_signed_precision_type (lb_type, max_precision_type
(ub_type, compute_type_for_level
- (pbb, level - 1)));
+ (pbb, level)));
}
/* Creates a new LOOP corresponding to Cloog's STMT. Inserts an
return NULL;
}
-/* Check data dependency in LOOP at scattering level LEVEL.
+/* Check data dependency in LOOP at level LEVEL.
BB_PBB_MAPPING is a basic_block and it's related poly_bb_p
mapping. */
set_immediate_dominator (CDI_DOMINATORS, next_e->dest, next_e->src);
if (flag_loop_parallelize_all
- && !dependency_in_loop_p (loop, bb_pbb_mapping,
- get_scattering_level (level)))
+ && !dependency_in_loop_p (loop, bb_pbb_mapping, level))
loop->can_be_parallel = true;
return last_e;
translate_clast (region, context_loop, pc.stmt,
if_region->true_region->entry,
&newivs, newivs_index,
- bb_pbb_mapping, 1, params_index);
+ bb_pbb_mapping, 0, params_index);
graphite_verify ();
scev_reset ();
recompute_all_dominators ();
return (bp1->bb->index == bp2->bb->index);
}
-/* Returns the scattering dimension for STMTFOR.
-
- The relationship between dimension in scattering matrix
- and the DEPTH of the loop is:
- DIMENSION = 2*DEPTH - 1
-*/
-
-static inline int get_scattering_level (int depth)
-{
- return 2 * depth - 1;
-}
-
#endif
{
ppl_Pointset_Powerset_C_Polyhedron_t po;
ppl_Pointset_Powerset_C_Polyhedron_t eqpp;
- graphite_dim_t tdim1 = pbb_nb_scattering_transform (PDR_PBB (pdr1));
- graphite_dim_t ddim1 = pbb_dim_iter_domain (PDR_PBB (pdr1));
+ poly_bb_p pbb = PDR_PBB (pdr1);
+ graphite_dim_t tdim1 = pbb_nb_scattering_transform (pbb);
+ graphite_dim_t ddim1 = pbb_dim_iter_domain (pbb);
ppl_dimension_type dim;
bool empty_p;
poly_ddr_p pddr = new_poly_ddr (pdr1, pdr2, 1, false);
+ graphite_dim_t pos;
if (PDDR_KIND (pddr) == unknown_dependence)
{
po = PDDR_DDP (pddr);
ppl_Pointset_Powerset_C_Polyhedron_space_dimension (po, &dim);
- eqpp = build_pairwise_scheduling (dim, level, tdim1 + ddim1, 1);
+ pos = psct_dynamic_dim (pbb, level);
+ eqpp = build_pairwise_scheduling (dim, pos, tdim1 + ddim1, 1);
ppl_Pointset_Powerset_C_Polyhedron_intersection_assign (eqpp, po);
empty_p = ppl_powerset_is_empty (eqpp);