summaryrefslogtreecommitdiff
path: root/gcc/gimple-loop-jam.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-12-05 12:05:59 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2018-12-05 12:05:59 +0100
commit7ba6738bd24dacf4f207ddc7142dde603ddc7482 (patch)
tree934d9824366823f10ed625732339f448e2b34546 /gcc/gimple-loop-jam.c
parent9c6ff7b2251f5826485d778a81760e65cb1a66a8 (diff)
re PR tree-optimization/87360 (ICE in remove_redundant_iv_tests at gcc/tree-ssa-loop-ivcanon.c:571 since r255467)
PR tree-optimization/87360 * gimple-loop-jam.c (tree_loop_unroll_and_jam): On failure to analyze data dependencies, don't return false, just continue. Formatting fixes. (merge_loop_tree, bb_prevents_fusion_p, unroll_jam_possible_p, fuse_loops): Formatting fixes. * g++.dg/opt/pr87360.C: New test. * gfortran.dg/pr87360.f90: New test. From-SVN: r266820
Diffstat (limited to 'gcc/gimple-loop-jam.c')
-rw-r--r--gcc/gimple-loop-jam.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/gimple-loop-jam.c b/gcc/gimple-loop-jam.c
index c6bd0428684..5920cad1f10 100644
--- a/gcc/gimple-loop-jam.c
+++ b/gcc/gimple-loop-jam.c
@@ -118,7 +118,7 @@ merge_loop_tree (struct loop *loop, struct loop *old)
for (i = 0; i < n; i++)
{
/* If the block was direct child of OLD loop it's now part
- of LOOP. If it was outside OLD, then it moved into LOOP
+ of LOOP. If it was outside OLD, then it moved into LOOP
as well. This avoids changing the loop father for BBs
in inner loops of OLD. */
if (bbs[i]->loop_father == old
@@ -167,7 +167,7 @@ bb_prevents_fusion_p (basic_block bb)
* stores or unknown side-effects prevent fusion
* loads don't
* computations into SSA names: these aren't problematic. Their
- result will be unused on the exit edges of the first N-1 copies
+ result will be unused on the exit edges of the first N-1 copies
(those aren't taken after unrolling). If they are used on the
other edge (the one leading to the outer latch block) they are
loop-carried (on the outer loop) and the Nth copy of BB will
@@ -282,12 +282,12 @@ unroll_jam_possible_p (struct loop *outer, struct loop *loop)
if (!simple_iv (loop, loop, op, &iv, true))
return false;
/* The inductions must be regular, loop invariant step and initial
- value. */
+ value. */
if (!expr_invariant_in_loop_p (outer, iv.step)
|| !expr_invariant_in_loop_p (outer, iv.base))
return false;
/* XXX With more effort we could also be able to deal with inductions
- where the initial value is loop variant but a simple IV in the
+ where the initial value is loop variant but a simple IV in the
outer loop. The initial value for the second body would be
the original initial value plus iv.base.step. The next value
for the fused loop would be the original next value of the first
@@ -322,7 +322,7 @@ fuse_loops (struct loop *loop)
gcc_assert (EDGE_COUNT (next->header->preds) == 1);
/* The PHI nodes of the second body (single-argument now)
- need adjustments to use the right values: either directly
+ need adjustments to use the right values: either directly
the value of the corresponding PHI in the first copy or
the one leaving the first body which unrolling did for us.
@@ -449,13 +449,13 @@ tree_loop_unroll_and_jam (void)
dependences.create (10);
datarefs.create (10);
if (!compute_data_dependences_for_loop (outer, true, &loop_nest,
- &datarefs, &dependences))
+ &datarefs, &dependences))
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "Cannot analyze data dependencies\n");
free_data_refs (datarefs);
free_dependence_relations (dependences);
- return false;
+ continue;
}
if (!datarefs.length ())
continue;
@@ -490,7 +490,7 @@ tree_loop_unroll_and_jam (void)
&removed))
{
/* Couldn't get the distance vector. For two reads that's
- harmless (we assume we should unroll). For at least
+ harmless (we assume we should unroll). For at least
one write this means we can't check the dependence direction
and hence can't determine safety. */
@@ -503,7 +503,7 @@ tree_loop_unroll_and_jam (void)
}
/* We regard a user-specified minimum percentage of zero as a request
- to ignore all profitability concerns and apply the transformation
+ to ignore all profitability concerns and apply the transformation
always. */
if (!PARAM_VALUE (PARAM_UNROLL_JAM_MIN_PERCENT))
profit_unroll = 2;