cfgloopmanip.c (create_empty_loop_on_edge): Generate upper bounds with LT_EXPR to make niter analysis more precise on code...
2009-08-28 Sebastian Pop <sebastian.pop@amd.com> * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper bounds with LT_EXPR to make niter analysis more precise on code generated by Graphite. From-SVN: r151180
This commit is contained in:
parent
66b466c309
commit
45e76e9f39
|
@ -1,3 +1,9 @@
|
||||||
|
2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
|
||||||
|
|
||||||
|
* cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
|
||||||
|
bounds with LT_EXPR to make niter analysis more precise on code
|
||||||
|
generated by Graphite.
|
||||||
|
|
||||||
2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
|
2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
|
||||||
|
|
||||||
* graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
|
* graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
|
||||||
|
|
||||||
|
* cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
|
||||||
|
bounds with LT_EXPR to make niter analysis more precise on code
|
||||||
|
generated by Graphite.
|
||||||
|
|
||||||
2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
|
2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
|
||||||
|
|
||||||
* graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
|
* graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
|
||||||
|
|
|
@ -599,7 +599,7 @@ create_empty_if_region_on_edge (edge entry_edge, tree condition)
|
||||||
| | | | |
|
| | | | |
|
||||||
| ----------- | ---V--- loop_body ---------------
|
| ----------- | ---V--- loop_body ---------------
|
||||||
| | | iv_after = iv_before + stride |
|
| | | iv_after = iv_before + stride |
|
||||||
| | | if (iv_after <= upper_bound) |
|
| | | if (iv_before < upper_bound) |
|
||||||
| | ---|--------------\--------------
|
| | ---|--------------\--------------
|
||||||
| | | \ exit_e
|
| | | \ exit_e
|
||||||
| | V \
|
| | V \
|
||||||
|
@ -609,9 +609,9 @@ create_empty_if_region_on_edge (edge entry_edge, tree condition)
|
||||||
| \ ___ /
|
| \ ___ /
|
||||||
|
|
||||||
Creates an empty loop as shown above, the IV_BEFORE is the SSA_NAME
|
Creates an empty loop as shown above, the IV_BEFORE is the SSA_NAME
|
||||||
that is used before the increment of IV. IV_BEFORE should be used for
|
that is used before the increment of IV. IV_BEFORE should be used for
|
||||||
adding code to the body that uses the IV. OUTER is the outer loop in
|
adding code to the body that uses the IV. OUTER is the outer loop in
|
||||||
which the new loop should be inserted.
|
which the new loop should be inserted.
|
||||||
|
|
||||||
Both INITIAL_VALUE and UPPER_BOUND expressions are gimplified and
|
Both INITIAL_VALUE and UPPER_BOUND expressions are gimplified and
|
||||||
inserted on the loop entry edge. This implies that this function
|
inserted on the loop entry edge. This implies that this function
|
||||||
|
@ -619,7 +619,7 @@ create_empty_if_region_on_edge (edge entry_edge, tree condition)
|
||||||
invariant. */
|
invariant. */
|
||||||
|
|
||||||
struct loop *
|
struct loop *
|
||||||
create_empty_loop_on_edge (edge entry_edge,
|
create_empty_loop_on_edge (edge entry_edge,
|
||||||
tree initial_value,
|
tree initial_value,
|
||||||
tree stride, tree upper_bound,
|
tree stride, tree upper_bound,
|
||||||
tree iv,
|
tree iv,
|
||||||
|
@ -637,7 +637,7 @@ create_empty_loop_on_edge (edge entry_edge,
|
||||||
tree exit_test;
|
tree exit_test;
|
||||||
edge exit_e;
|
edge exit_e;
|
||||||
int prob;
|
int prob;
|
||||||
|
|
||||||
gcc_assert (entry_edge && initial_value && stride && upper_bound && iv);
|
gcc_assert (entry_edge && initial_value && stride && upper_bound && iv);
|
||||||
|
|
||||||
/* Create header, latch and wire up the loop. */
|
/* Create header, latch and wire up the loop. */
|
||||||
|
@ -696,7 +696,7 @@ create_empty_loop_on_edge (edge entry_edge,
|
||||||
|
|
||||||
/* Insert loop exit condition. */
|
/* Insert loop exit condition. */
|
||||||
cond_expr = gimple_build_cond
|
cond_expr = gimple_build_cond
|
||||||
(LE_EXPR, *iv_after, upper_bound, NULL_TREE, NULL_TREE);
|
(LT_EXPR, *iv_before, upper_bound, NULL_TREE, NULL_TREE);
|
||||||
|
|
||||||
exit_test = gimple_cond_lhs (cond_expr);
|
exit_test = gimple_cond_lhs (cond_expr);
|
||||||
exit_test = force_gimple_operand_gsi (&gsi, exit_test, true, NULL,
|
exit_test = force_gimple_operand_gsi (&gsi, exit_test, true, NULL,
|
||||||
|
|
Loading…
Reference in New Issue