mirror of git://gcc.gnu.org/git/gcc.git
Fix comments and indentation.
2010-06-09 Sebastian Pop <sebastian.pop@amd.com> * graphite-poly.h: Fix comments and indentation. * graphite-sese-to-poly.c: Same. (build_sese_conditions_before): Compute stmt and gbb only when needed. * tree-chrec.c: Fix comments and indentation. (tree-ssa-loop-niter.c): Same. From-SVN: r160508
This commit is contained in:
parent
642d55de0e
commit
072edf0751
|
|
@ -1,3 +1,11 @@
|
||||||
|
2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
|
||||||
|
|
||||||
|
* graphite-poly.h: Fix comments and indentation.
|
||||||
|
* graphite-sese-to-poly.c: Same.
|
||||||
|
(build_sese_conditions_before): Compute stmt and gbb only when needed.
|
||||||
|
* tree-chrec.c: Fix comments and indentation.
|
||||||
|
(tree-ssa-loop-niter.c): Same.
|
||||||
|
|
||||||
2010-06-09 Eric Botcazou <ebotcazou@adacore.com>
|
2010-06-09 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
PR rtl-optimization/42461
|
PR rtl-optimization/42461
|
||||||
|
|
|
||||||
|
|
@ -388,6 +388,7 @@ number_of_write_pdrs (poly_bb_p pbb)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The basic block of the PBB. */
|
/* The basic block of the PBB. */
|
||||||
|
|
||||||
static inline basic_block
|
static inline basic_block
|
||||||
pbb_bb (poly_bb_p pbb)
|
pbb_bb (poly_bb_p pbb)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1328,8 +1328,7 @@ add_condition_to_pbb (poly_bb_p pbb, gimple stmt, enum tree_code code)
|
||||||
(&right, left);
|
(&right, left);
|
||||||
add_condition_to_domain (left, stmt, pbb, LT_EXPR);
|
add_condition_to_domain (left, stmt, pbb, LT_EXPR);
|
||||||
add_condition_to_domain (right, stmt, pbb, GT_EXPR);
|
add_condition_to_domain (right, stmt, pbb, GT_EXPR);
|
||||||
ppl_Pointset_Powerset_C_Polyhedron_upper_bound_assign (left,
|
ppl_Pointset_Powerset_C_Polyhedron_upper_bound_assign (left, right);
|
||||||
right);
|
|
||||||
ppl_delete_Pointset_Powerset_C_Polyhedron (right);
|
ppl_delete_Pointset_Powerset_C_Polyhedron (right);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -1344,12 +1343,11 @@ add_conditions_to_domain (poly_bb_p pbb)
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
gimple stmt;
|
gimple stmt;
|
||||||
gimple_bb_p gbb = PBB_BLACK_BOX (pbb);
|
gimple_bb_p gbb = PBB_BLACK_BOX (pbb);
|
||||||
VEC (gimple, heap) *conditions = GBB_CONDITIONS (gbb);
|
|
||||||
|
|
||||||
if (VEC_empty (gimple, conditions))
|
if (VEC_empty (gimple, GBB_CONDITIONS (gbb)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (i = 0; VEC_iterate (gimple, conditions, i, stmt); i++)
|
for (i = 0; VEC_iterate (gimple, GBB_CONDITIONS (gbb), i, stmt); i++)
|
||||||
switch (gimple_code (stmt))
|
switch (gimple_code (stmt))
|
||||||
{
|
{
|
||||||
case GIMPLE_COND:
|
case GIMPLE_COND:
|
||||||
|
|
@ -1357,7 +1355,7 @@ add_conditions_to_domain (poly_bb_p pbb)
|
||||||
enum tree_code code = gimple_cond_code (stmt);
|
enum tree_code code = gimple_cond_code (stmt);
|
||||||
|
|
||||||
/* The conditions for ELSE-branches are inverted. */
|
/* The conditions for ELSE-branches are inverted. */
|
||||||
if (VEC_index (gimple, gbb->condition_cases, i) == NULL)
|
if (!VEC_index (gimple, GBB_CONDITION_CASES (gbb), i))
|
||||||
code = invert_tree_comparison (code, false);
|
code = invert_tree_comparison (code, false);
|
||||||
|
|
||||||
add_condition_to_pbb (pbb, stmt, code);
|
add_condition_to_pbb (pbb, stmt, code);
|
||||||
|
|
@ -1409,12 +1407,14 @@ build_sese_conditions_before (struct dom_walk_data *dw_data,
|
||||||
struct bsc *data = (struct bsc *) dw_data->global_data;
|
struct bsc *data = (struct bsc *) dw_data->global_data;
|
||||||
VEC (gimple, heap) **conditions = data->conditions;
|
VEC (gimple, heap) **conditions = data->conditions;
|
||||||
VEC (gimple, heap) **cases = data->cases;
|
VEC (gimple, heap) **cases = data->cases;
|
||||||
gimple_bb_p gbb = gbb_from_bb (bb);
|
gimple_bb_p gbb;
|
||||||
gimple stmt = single_pred_cond (bb);
|
gimple stmt;
|
||||||
|
|
||||||
if (!bb_in_sese_p (bb, data->region))
|
if (!bb_in_sese_p (bb, data->region))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
stmt = single_pred_cond (bb);
|
||||||
|
|
||||||
if (stmt)
|
if (stmt)
|
||||||
{
|
{
|
||||||
edge e = single_pred_edge (bb);
|
edge e = single_pred_edge (bb);
|
||||||
|
|
@ -1427,6 +1427,8 @@ build_sese_conditions_before (struct dom_walk_data *dw_data,
|
||||||
VEC_safe_push (gimple, heap, *cases, NULL);
|
VEC_safe_push (gimple, heap, *cases, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gbb = gbb_from_bb (bb);
|
||||||
|
|
||||||
if (gbb)
|
if (gbb)
|
||||||
{
|
{
|
||||||
GBB_CONDITIONS (gbb) = VEC_copy (gimple, heap, *conditions);
|
GBB_CONDITIONS (gbb) = VEC_copy (gimple, heap, *conditions);
|
||||||
|
|
@ -2924,6 +2926,7 @@ scop_canonicalize_loops (scop_p scop)
|
||||||
/* Can all ivs be represented by a signed integer?
|
/* Can all ivs be represented by a signed integer?
|
||||||
As CLooG might generate negative values in its expressions, signed loop ivs
|
As CLooG might generate negative values in its expressions, signed loop ivs
|
||||||
are required in the backend. */
|
are required in the backend. */
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
scop_ivs_can_be_represented (scop_p scop)
|
scop_ivs_can_be_represented (scop_p scop)
|
||||||
{
|
{
|
||||||
|
|
@ -2941,7 +2944,7 @@ scop_ivs_can_be_represented (scop_p scop)
|
||||||
if (!loop->single_iv)
|
if (!loop->single_iv)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
type = TREE_TYPE(loop->single_iv);
|
type = TREE_TYPE (loop->single_iv);
|
||||||
precision = TYPE_PRECISION (type);
|
precision = TYPE_PRECISION (type);
|
||||||
|
|
||||||
if (TYPE_UNSIGNED (type)
|
if (TYPE_UNSIGNED (type)
|
||||||
|
|
|
||||||
|
|
@ -1230,13 +1230,15 @@ convert_affine_scev (struct loop *loop, tree type,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Convert CHREC for the right hand side of a CREC.
|
/* Convert CHREC for the right hand side of a CHREC.
|
||||||
The increment for a pointer type is always sizetype. */
|
The increment for a pointer type is always sizetype. */
|
||||||
|
|
||||||
tree
|
tree
|
||||||
chrec_convert_rhs (tree type, tree chrec, gimple at_stmt)
|
chrec_convert_rhs (tree type, tree chrec, gimple at_stmt)
|
||||||
{
|
{
|
||||||
if (POINTER_TYPE_P (type))
|
if (POINTER_TYPE_P (type))
|
||||||
type = sizetype;
|
type = sizetype;
|
||||||
|
|
||||||
return chrec_convert (type, chrec, at_stmt);
|
return chrec_convert (type, chrec, at_stmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -875,11 +875,11 @@ assert_loop_rolls_lt (tree type, affine_iv *iv0, affine_iv *iv1,
|
||||||
-step + 1 <= (iv1->base - iv0->base) <= MAX - step + 1
|
-step + 1 <= (iv1->base - iv0->base) <= MAX - step + 1
|
||||||
|
|
||||||
(where MAX is the maximum value of the unsigned variant of TYPE, and
|
(where MAX is the maximum value of the unsigned variant of TYPE, and
|
||||||
the computations in this formula are performed in full precision
|
the computations in this formula are performed in full precision,
|
||||||
(without overflows).
|
i.e., without overflows).
|
||||||
|
|
||||||
Usually, for loops with exit condition iv0->base + step * i < iv1->base,
|
Usually, for loops with exit condition iv0->base + step * i < iv1->base,
|
||||||
we have a condition of form iv0->base - step < iv1->base before the loop,
|
we have a condition of the form iv0->base - step < iv1->base before the loop,
|
||||||
and for loops iv0->base < iv1->base - step * i the condition
|
and for loops iv0->base < iv1->base - step * i the condition
|
||||||
iv0->base < iv1->base + step, due to loop header copying, which enable us
|
iv0->base < iv1->base + step, due to loop header copying, which enable us
|
||||||
to prove the lower bound.
|
to prove the lower bound.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue