re PR tree-optimization/54629 (ICE (segfault) in index_in_loop_nest tree-data-ref.h:608)

2012-09-21  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/54629
	* tree-loop-distribution.c (classify_partition): Free loop nest only
	after freeing ddr.  Free ddr and loop nest also if successful.

From-SVN: r191611
This commit is contained in:
Jakub Jelinek 2012-09-21 13:54:14 +02:00 committed by Richard Biener
parent a30b9bb5cd
commit b7ce70b395
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2012-09-21 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/54629
* tree-loop-distribution.c (classify_partition): Free loop nest only
after freeing ddr. Free ddr and loop nest also if successful.
2012-09-21 Matthias Klose <doko@ubuntu.com>
* config/arm/arm.c (arm_mangle_type): Don't warn anymore that

View File

@ -1019,10 +1019,10 @@ classify_partition (loop_p loop, struct graph *rdg, partition_t partition)
ddr = initialize_data_dependence_relation (single_load, single_store,
loops);
compute_affine_dependence (ddr, loop);
VEC_free (loop_p, heap, loops);
if (DDR_ARE_DEPENDENT (ddr) == chrec_dont_know)
{
free_dependence_relation (ddr);
VEC_free (loop_p, heap, loops);
return;
}
if (DDR_ARE_DEPENDENT (ddr) != chrec_known)
@ -1030,6 +1030,7 @@ classify_partition (loop_p loop, struct graph *rdg, partition_t partition)
if (DDR_NUM_DIST_VECTS (ddr) == 0)
{
free_dependence_relation (ddr);
VEC_free (loop_p, heap, loops);
return;
}
lambda_vector dist_v;
@ -1040,10 +1041,13 @@ classify_partition (loop_p loop, struct graph *rdg, partition_t partition)
if (dist > 0 && !DDR_REVERSED_P (ddr))
{
free_dependence_relation (ddr);
VEC_free (loop_p, heap, loops);
return;
}
}
}
free_dependence_relation (ddr);
VEC_free (loop_p, heap, loops);
partition->kind = PKIND_MEMCPY;
partition->main_dr = single_store;
partition->secondary_dr = single_load;