diff mbox

Fix PR77290

Message ID alpine.LSU.2.11.1608190940590.26629@t29.fhfr.qr
State New
Headers show

Commit Message

Richard Biener Aug. 19, 2016, 7:42 a.m. UTC
This fixes PR77290 - my previous patch to PRE to limit insertion
for flag_tree_parallelize_loops != 0 was confused because
flag_tree_parallelize_loops is the number of threads to parallelize
for (thus == 1 is the default and to not parallelize).

Fixed as obvious.

Richard.

2016-08-19  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/77290
	* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
	Fix flag_tree_parallelize_loops check.

Comments

Andreas Schwab Aug. 21, 2016, 12:44 p.m. UTC | #1
$ gcc/gfortran -B gcc/ -B aarch64-suse-linux/libgfortran/ -std=legacy -floop-nest-optimize -O2 -S ../gcc/testsuite/gfortran.dg/graphite/pr68279.f90 
isl_aff.c:1001: position out of bounds
../gcc/testsuite/gfortran.dg/graphite/pr68279.f90:8:0:

   SUBROUTINE stack_binning(params_in, params_out, stack_size)
 
internal compiler error: Aborted
0xbb3e0f crash_signal
        ../../gcc/toplev.c:335
0x112a33b extract_affine_chrec
        ../../gcc/graphite-sese-to-poly.c:239
0x112a33b extract_affine
        ../../gcc/graphite-sese-to-poly.c:381
0x112a1d7 extract_affine
        ../../gcc/graphite-sese-to-poly.c:421
0x112a1d7 extract_affine
        ../../gcc/graphite-sese-to-poly.c:421
0x112b36b add_condition_to_pbb
        ../../gcc/graphite-sese-to-poly.c:458
0x112b36b add_conditions_to_domain
        ../../gcc/graphite-sese-to-poly.c:525
0x112b36b build_iteration_domains
        ../../gcc/graphite-sese-to-poly.c:1017
0x112b0fb build_iteration_domains
        ../../gcc/graphite-sese-to-poly.c:1040
0x112b957 build_poly_scop(scop*)
        ../../gcc/graphite-sese-to-poly.c:1364
0x1115abf graphite_transform_loops()
        ../../gcc/graphite.c:319
0x111600f graphite_transforms
        ../../gcc/graphite.c:356
0x111600f execute
        ../../gcc/graphite.c:433

Andreas.
Richard Biener Aug. 22, 2016, 7:15 a.m. UTC | #2
On Sun, 21 Aug 2016, Andreas Schwab wrote:

> $ gcc/gfortran -B gcc/ -B aarch64-suse-linux/libgfortran/ -std=legacy -floop-nest-optimize -O2 -S ../gcc/testsuite/gfortran.dg/graphite/pr68279.f90 
> isl_aff.c:1001: position out of bounds
> ../gcc/testsuite/gfortran.dg/graphite/pr68279.f90:8:0:
> 
>    SUBROUTINE stack_binning(params_in, params_out, stack_size)
>  
> internal compiler error: Aborted
> 0xbb3e0f crash_signal
>         ../../gcc/toplev.c:335
> 0x112a33b extract_affine_chrec
>         ../../gcc/graphite-sese-to-poly.c:239
> 0x112a33b extract_affine
>         ../../gcc/graphite-sese-to-poly.c:381
> 0x112a1d7 extract_affine
>         ../../gcc/graphite-sese-to-poly.c:421
> 0x112a1d7 extract_affine
>         ../../gcc/graphite-sese-to-poly.c:421
> 0x112b36b add_condition_to_pbb
>         ../../gcc/graphite-sese-to-poly.c:458
> 0x112b36b add_conditions_to_domain
>         ../../gcc/graphite-sese-to-poly.c:525
> 0x112b36b build_iteration_domains
>         ../../gcc/graphite-sese-to-poly.c:1017
> 0x112b0fb build_iteration_domains
>         ../../gcc/graphite-sese-to-poly.c:1040
> 0x112b957 build_poly_scop(scop*)
>         ../../gcc/graphite-sese-to-poly.c:1364
> 0x1115abf graphite_transform_loops()
>         ../../gcc/graphite.c:319
> 0x111600f graphite_transforms
>         ../../gcc/graphite.c:356
> 0x111600f execute
>         ../../gcc/graphite.c:433

Can you please open a bugzilla and also specify the ISL version you use?

Thanks,
Richard.
diff mbox

Patch

Index: gcc/tree-ssa-pre.c
===================================================================
--- gcc/tree-ssa-pre.c	(revision 239606)
+++ gcc/tree-ssa-pre.c	(working copy)
@@ -4270,7 +4270,7 @@  eliminate_dom_walker::before_dom_childre
 	  if (sprime
 	      && TREE_CODE (sprime) == SSA_NAME
 	      && do_pre
-	      && (flag_tree_loop_vectorize || flag_tree_parallelize_loops)
+	      && (flag_tree_loop_vectorize || flag_tree_parallelize_loops > 1)
 	      && loop_outer (b->loop_father)
 	      && has_zero_uses (sprime)
 	      && bitmap_bit_p (inserted_exprs, SSA_NAME_VERSION (sprime))