Re: [PATCH, PR69110] Don't return NULL access_fns in dr_analyze_indices

2016-01-23 Thread Sebastian Pop
On Sat, Jan 23, 2016 at 12:28 PM, Tom de Vries wrote: > That was my original patch, and Richard commented: 'I think avoiding a NULL > access_fns is ok but it should be done unconditionally, not only for the > DECL_P case'. In order words, he asked me to do the exact opposite of the > change you no

[PATCH 1/3] add missing testcase

2016-01-25 Thread Sebastian Pop
--- gcc/testsuite/gcc.dg/graphite/pr69292.c | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/graphite/pr69292.c diff --git a/gcc/testsuite/gcc.dg/graphite/pr69292.c b/gcc/testsuite/gcc.dg/graphite/pr69292.c new file mode 100644 index 000..b9

[PATCH 2/3] fix PR68343: disable fuse-*.c tests for isl 0.14 or earlier

2016-01-25 Thread Sebastian Pop
The patch disables all fuse-*.c tests when configuring gcc with isl 0.14 or earlier. ChangeLog: * Makefile.in: Regenerate. * Makefile.tpl: Export ISLVER. * configure: Regenerate. * config/isl.m4: Detect isl-0.15. gcc/ * Makefile.in: Set ISLVER in site.ex

[PATCH 3/3] new scop schedule for isl-0.15

2016-01-25 Thread Sebastian Pop
Keep unchanged the implementation for isl-0.14. * graphite-poly.c (apply_poly_transforms): Simplify. (print_isl_set): Use more readable format: ISL_YAML_STYLE_BLOCK. (print_isl_map): Same. (print_isl_union_map): Same. (print_isl_schedule): New. (debu

Re: [PATCH, PR69110] Don't return NULL access_fns in dr_analyze_indices

2016-01-26 Thread Sebastian Pop
Tom de Vries wrote: > diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c > index a40f40d..4c29fc2 100644 > --- a/gcc/tree-data-ref.c > +++ b/gcc/tree-data-ref.c > @@ -1510,8 +1510,9 @@ initialize_data_dependence_relation (struct > data_reference *a, >if (operand_equal_p (DR_REF (a), DR_REF

[PATCH] [graphite] handle isl_ast_op_select

2016-01-26 Thread Sebastian Pop
2016-01-26 Abderrazek Zaafrani Sebastian Pop * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Handle isl_ast_op_cond and isl_ast_op_select. (gcc_expression_from_isl_expr_op): Same. * gcc.dg/graphite/isl-ast-op-select.c: New. --- gcc/graphite

[PATCH 1/3] [graphite] assert instead of silently failing code gen

2016-01-28 Thread Sebastian Pop
* graphite-isl-ast-to-gimple.c (get_rename_from_scev): Assert instead of setting codegen_error to fail codegen. --- gcc/graphite-isl-ast-to-gimple.c | 26 ++ 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gc

[PATCH 3/3] [graphite] remove out of sync comments

2016-01-28 Thread Sebastian Pop
* graphite-isl-ast-to-gimple.c (class translate_isl_ast_to_gimple): Remove comments from class declarations: they are already in the code close by the defs. --- gcc/graphite-isl-ast-to-gimple.c | 437 --- 1 file changed, 83 insertions(+),

[PATCH 2/3] [graphite] use codegen_error_p

2016-01-28 Thread Sebastian Pop
* graphite-isl-ast-to-gimple.c (binary_op_to_tree): Call codegen_error_p. (ternary_op_to_tree): Same. (unary_op_to_tree): Same. (nary_op_to_tree): Same. (gcc_expression_from_isl_expr_op): Same. (gcc_expression_from_isl_expression): Same. (gra

[PATCH] [graphite] make debug comment more explicit

2016-01-28 Thread Sebastian Pop
2016-01-28 Abderrazek Zaafrani * graphite-optimize-isl.c (optimize_isl): Print a different debug message when isl does not return a valid schedule. --- gcc/graphite-optimize-isl.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/graphite-optim

[PATCH] [graphite] document that isl-0.16 is supported

2016-01-29 Thread Sebastian Pop
* config/isl.m4: Add comments about isl-0.16. * configure: Regenerate. gcc/ * doc/install.texi: Document that isl-0.16 is supported. --- config/isl.m4| 6 +++--- configure| 12 ++-- gcc/doc/install.texi | 2 +- 3 files changed, 10 insertions(+

[PATCH] [graphite] fix pr61929

2015-07-16 Thread Sebastian Pop
This fixes bootstrap of GCC with BOOT_CFLAGS="-g -O2 -fgraphite-identity -floop-nest-optimize -floop-block -floop-interchange -floop-strip-mine". It passes regstrap on amd64-linux. Ok to commit to trunk? Thanks. 2015-07-15 Aditya Kumar Sebastian Pop PR middle

[PATCH] enable loop fusion with ISL scheduler

2015-07-16 Thread Sebastian Pop
gcc/ChangeLog: 2015-07-16 Aditya Kumar Sebastian Pop * common.opt (floop-fuse): New. * doc/invoke.texi (floop-fuse): Documented. * graphite-optimize-isl.c (optimize_isl): Use ISL_SCHEDULE_FUSE_MAX when using flag_loop_fuse. * graphite

Re: [RFC, PR66873] Use graphite for parloops

2015-07-20 Thread Sebastian Pop
Tom de Vries wrote: > >>>graphite dependence analysis is too slow to be enabled unconditionally. > >>>(read: hours in some simple cases - see bugzilla) > >> > >>Haha, "cool"! ;-) > >> > >>Maybe it is still reasonable to use graphite to analyze the code inside > >>OpenACC kernels regions -- maybe s

Re: [RFC, PR66873] Use graphite for parloops

2015-07-20 Thread Sebastian Pop
Tom de Vries wrote: > So I wondered, why not always use the graphite dependency analysis > in parloops. (Of course you could use -floop-parallelize-all, but > that also changes the heuristic). So I wrote a patch for parloops to > use graphite dependency analysis by default (so without > -floop-para

[PATCH] remove tree-browser

2015-07-20 Thread Sebastian Pop
Regstrapped on amd64-linux. Ok for trunk? Thanks, Sebastian 2015-07-20 Sebastian Pop * Makefile.in: Remove use of TREEBROWSER. * config.in: Regenerated. * configure: Regenerated. * configure.ac: Remove definition of TREEBROWSER

Re: [RFC, PR66873] Use graphite for parloops

2015-07-21 Thread Sebastian Pop
Tom de Vries wrote: > Fix reduction safety checks > > * graphite-sese-to-poly.c (is_reduction_operation_p): Limit > flag_associative_math to SCALAR_FLOAT_TYPE_P. Honour > TYPE_OVERFLOW_TRAPS and TYPE_OVERFLOW_WRAPS for INTEGRAL_TYPE_P. > Only allow wrapping fixed-point oth

Re: [PATCH] gcc: fix building w/isl-0.15

2015-07-21 Thread Sebastian Pop
omebody with access to sourceware.org upload a tar.bz2 of the required version of isl from http://isl.gforge.inria.fr/isl-0.15.tar.bz2? Also, once that is done, I will commit the following patch updating the documentation. Thanks, Sebastian >From 189565d5f0cdcb54aac309316316456b88957ef6 Mon

Re: [PATCH] Don't allow unsafe reductions in graphite

2015-07-24 Thread Sebastian Pop
Richard Biener wrote: > On Wed, Jul 22, 2015 at 6:00 PM, Tom de Vries wrote: > > Currently bootstrapping and reg-testing on x86_64. > > > > OK for trunk? > > > > OK 5 and 4.9 release branches? > > Ok if Sebastian is fine with it. Ok to backport as well. Thanks Tom for the patches.

Re: [PATCH] gcc: fix building w/isl-0.15

2015-07-24 Thread Sebastian Pop
Jeff Law wrote: > On 07/21/2015 02:32 PM, Sebastian Pop wrote: > > > >Could somebody with access to sourceware.org upload a tar.bz2 of the required > >version of isl from http://isl.gforge.inria.fr/isl-0.15.tar.bz2? > > > >Also, once that is done, I will commit

[PATCH] [graphite] dump reasons why graphite failed to detect a scop

2015-07-24 Thread Sebastian Pop
When trying to analyze why Graphite does not handle a loop nest, it is easy to look in the dumps of -fdump-tree-graphite-all to guess what has to be changed to catch the loop. This patch makes the dumps a bit more verbose and useful. --- gcc/graphite-scop-detection.c | 72

Re: [RFC, PR66873] Use graphite for parloops

2015-07-26 Thread Sebastian Pop
On Sun, Jul 26, 2015 at 4:21 PM, Tom de Vries wrote: > I wrote an equivalent test-case in C: > ... > $ cat src/gcc/testsuite/gcc.dg/autopar/outer-7.c > /* { dg-do compile } */ > /* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops-details > -fdump-tree-optimized" } */ > > void abor

Re: [PATCH] [graphite] Reduce the number of params in a scop to 3

2015-07-29 Thread Sebastian Pop
Aditya Kumar wrote: > More than 3 params consumes too much memory while bootstrapping gcc > with graphite enabled. Ok. I will commit the patch. Thanks for fixing bootstrap with graphite enabled. Sebastian

Re: [PATCH] [graphite] Reduce the number of params in a scop to 3

2015-07-29 Thread Sebastian Pop
Sebastian Pop wrote: > Aditya Kumar wrote: > > More than 3 params consumes too much memory while bootstrapping gcc > > with graphite enabled. > > Ok. I will commit the patch. > Thanks for fixing bootstrap with graphite enabled. We will increase the max when we will use

[PATCH] fix PR67700

2015-09-25 Thread Sebastian Pop
The patch makes the detection of scop parameters in parameter_index_in_region a bit more conservative by discarding scalar variables defined in function of data references defined in the scop. 2015-09-25 Aditya Kumar Sebastian Pop PR tree-optimization/67700

[PATCH] remove dead code of commutative_reductions

2015-09-29 Thread Sebastian Pop
the data dependence graph.) Patch passed bootstrap and check on x86_64-linux with ISL-0.15. I will commit this patch to trunk. 2015-09-29 Sebastian Pop Aditya Kumar * graphite-sese-to-poly.c (gsi_for_phi_node): Remove. (nb_data_writes_in_bb): Remove

[PATCH] use MIN fusion for ISL-14

2015-09-29 Thread Sebastian Pop
This patch fixes PR66754 by reverting an earlier unintended change. We now generate a much simpler AST for interchange-1.c: ISL AST generated by ISL: { for (int c1 = 0; c1 <= 1334; c1 += 1) { S_7(c1); for (int c3 = 0; c3 <= 1334; c3 += 1) S_4(c1, c3); S_5(c1); } for (int c1

Re: [PATCH] remove dead code of commutative_reductions

2015-09-29 Thread Sebastian Pop
Tobias Grosser wrote: > On 09/29/2015 06:26 PM, Sebastian Pop wrote: > >This code is not used anymore after we removed the previous loop optimizer > >(not > >based on the ISL scheduler.) We will add back the detection of commutative > >reductions after we improve th

[PATCH 1/2] add recursion on the inner loops

2015-09-30 Thread Sebastian Pop
We now check that all data references in the current loop and inner loops contained within loop are valid in an outer region before declaring that the outer loop is a valid scop. 2015-09-30 Sebastian Pop Aditya Kumar PR tree-optimization/67754 * graphite-scop

[PATCH 2/2] call scev analysis in scop-detection as in sese-to-poly

2015-09-30 Thread Sebastian Pop
-linux when compiled with -m32. Patch passed bootstrap with BOOT_CFLAGS="-g -O2 -fgraphite-identity -floop-nest-optimize" and check on x86_64-linux using ISL-0.15. 2015-09-28 Sebastian Pop Aditya Kumar PR tree-optimization/67754 * graphite-scop-d

[PATCH] correctly handle non affine data references

2015-10-01 Thread Sebastian Pop
PR tree-optimization/66980 * graphite-scop-detection.c (stmt_has_simple_data_refs_p): Return false when data reference analysis has failed. --- gcc/graphite-scop-detection.c| 7 +++ gcc/testsuite/gcc.dg/graphite/scop-pr66980.c | 10 ++ 2 files c

[PATCH 3/3] increase the number of parameters

2015-10-02 Thread Sebastian Pop
--- gcc/params.def | 2 +- gcc/testsuite/gcc.dg/graphite/scop-sor.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/params.def b/gcc/params.def index 3f91992..da2c6a3 100644 --- a/gcc/params.def +++ b/gcc/params.def @@ -835,7 +835,7 @@ DEFPARAM

[PATCH 1/3] move scop detection related stuff to graphite-scop-detection.c

2015-10-02 Thread Sebastian Pop
From: hiraditya --- gcc/graphite-scop-detection.c | 1943 + gcc/graphite-sese-to-poly.c | 184 +--- 2 files changed, 1207 insertions(+), 920 deletions(-) diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c index 77fe25f..1704265

[PATCH 2/3] move param detection to scop detection

2015-10-02 Thread Sebastian Pop
--- gcc/graphite-poly.c | 68 ++- gcc/graphite-poly.h | 11 +- gcc/graphite-scop-detection.c| 217 ++--- gcc/graphite-sese-to-poly.c | 324 --- gcc/graphite-sese-to-poly.h

[PATCH] remove dead code used by the old cloog scheduler

2015-10-05 Thread Sebastian Pop
--- gcc/graphite-dependences.c | 36 gcc/graphite-poly.h| 3 --- 2 files changed, 39 deletions(-) diff --git a/gcc/graphite-dependences.c b/gcc/graphite-dependences.c index e39394a..37535d5 100644 --- a/gcc/graphite-dependences.c +++ b/gcc/graphite-de

[PATCH] remove dead code used by the old cloog scheduler

2015-10-05 Thread Sebastian Pop
--- gcc/graphite-dependences.c | 255 + gcc/graphite-poly.h| 3 - 2 files changed, 1 insertion(+), 257 deletions(-) diff --git a/gcc/graphite-dependences.c b/gcc/graphite-dependences.c index e39394a..2c4f92c 100644 --- a/gcc/graphite-dependenc

Re: using scratchpads to enhance RTL-level if-conversion: the new patch now passes bootstrap with the default BUILD_CONFIG [i.e. no stage2-to-stage3 comparison errors even with debugging info off in s

2015-10-05 Thread Sebastian Pop
On Mon, Oct 5, 2015 at 6:02 PM, Joseph Myers wrote: > Is this Samsung Austin R&D Center? If so, yes, there's an assignment Yes.

[PATCH] remove dead code used by the old cloog scheduler

2015-10-06 Thread Sebastian Pop
2015-10-05 Aditya Kumar Sebastian Pop * graphite-dependences.c (scop_get_transformed_schedule): Remove. (no_violations): Remove. (subtract_commutative_associative_deps): Remove. (compute_deps): Do not call

[PATCH 2/3] remove unused struct base_alias_pair

2015-10-06 Thread Sebastian Pop
2015-10-06 Aditya Kumar Sebastian Pop * graphite-poly.c (free_data_refs_aux): Remove. (free_gimple_poly_bb): Do not call free_data_refs_aux. * graphite-poly.h (struct base_alias_pair): Remove. * graphite-sese-to

[PATCH 3/3] move dr->alias_set to a helper structure

2015-10-06 Thread Sebastian Pop
2015-10-06 Aditya Kumar Sebastian Pop * graphite-poly.c (new_scop): Initialize drs. * graphite-poly.h (struct dr_info): New. (struct scop): Add drs. * graphite-sese-to-poly.c (pdr_add_alias_set): Use dr_info

[PATCH 1/3] remove dead code in computation of alias sets

2015-10-06 Thread Sebastian Pop
2015-10-06 Aditya Kumar Sebastian Pop * graphite-poly.c (new_poly_dr): Remove dr_base_object_set. Do not set PDR_BASE_OBJECT_SET. * graphite-poly.h (poly_dr): Same. (PDR_BASE_OBJECT_SET): Remove

[PATCH] move graphite bookkeeping from sese to sese_info

2015-10-06 Thread Sebastian Pop
2015-10-06 Aditya Kumar Sebastian Pop * graphite-isl-ast-to-gimple.c (translate_isl_ast_to_gimple): Use an sese_info_p. (copy_def): Same. (copy_internal_parameters): Same

Re: [PATCH 2/3] remove unused struct base_alias_pair

2015-10-07 Thread Sebastian Pop
On Wed, Oct 7, 2015 at 3:11 AM, Richard Biener wrote: > On Tue, Oct 6, 2015 at 10:45 PM, Sebastian Pop wrote: >> 2015-10-06 Aditya Kumar >> Sebastian Pop >> >> * graphite-poly.c (free_data_refs_aux): Remove. >>

[PATCH] remove unused code

2015-10-07 Thread Sebastian Pop
--- gcc/graphite-scop-detection.c | 3 --- gcc/sese.c| 1 - gcc/sese.h| 8 +--- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c index 7e5039c..43e03a6 100644 --- a/gcc/graphite-

[PATCH] remove unused code

2015-10-07 Thread Sebastian Pop
2015-10-07 Aditya Kumar Sebastian Pop * graphite-scop-detection.c (parameter_index_in_region): Remove use of SESE_ADD_PARAMS. (find_scop_parameters): Same. * sese.c (new_sese_info): Same. * sese.h

[PATCH] gather bbs and conditions in a single walk through dominators

2015-10-07 Thread Sebastian Pop
2015-10-06 Aditya Kumar Sebastian Pop * graphite-dependences.c (scop_get_dependences): Do not use SCOP_BBS. * graphite-isl-ast-to-gimple.c (get_max_schedule_dimensions): Same. (generate_isl_schedule): Same

Re: [PATCH] gather bbs and conditions in a single walk through dominators

2015-10-07 Thread Sebastian Pop
will use that vector in a patch that removes the out-of-ssa translation of scalar dependences: we will iterate through the basic blocks of a region to record scalar dependences crossing bbs or going out of the region. The patch passes bootstrap and regtest on x86_64-linux. Sebastian Pop wrote: &

Re: using scratchpads to enhance RTL-level if-conversion: revised patch

2015-10-08 Thread Sebastian Pop
Hi Abe, could you please avoid double negations, and please use early returns rather than huge right indentations: + if (! not_a_scratchpad_candidate) + { +if (MEM_SIZE_KNOWN_P (orig_x)) +{ + const size_t size_of_MEM = MEM_SIZE (orig_x); + + if (size_of_MEM <= SCRATCHPAD_MAX_S

Re: using scratchpads to enhance RTL-level if-conversion: revised patch

2015-10-08 Thread Sebastian Pop
the + THEN block and the set of 'a', if any. */ This comment duplicates the same content as the comment before the loop. Please remove. On Thu, Oct 8, 2015 at 8:08 AM, Sebastian Pop wrote: > Hi Abe, > > could you please avoid double negations, and > please use early return

[PATCH 2/2] add dump of data dependences

2015-10-09 Thread Sebastian Pop
2015-10-07 Aditya Kumar Sebastian Pop * graphite-dependences.c (scop_get_dependences): Add dump of the data dependence graph. * graphite-poly.c (print_isl_union_map): New. (debug_isl_union_map): New

[PATCH 1/2] clean up debug functions

2015-10-09 Thread Sebastian Pop
2015-10-07 Aditya Kumar Sebastian Pop * graphite-poly.c (print_iteration_domain): Remove verbosity. Remove OpenScop formatting. (print_iteration_domains): Same. (debug_iteration_domain): Same. (debug_iteration_domains): Same

[PATCH] [graphite] avoid generation of empty guards in trivial cases

2015-10-21 Thread Sebastian Pop
We used to insert a trivial integer_onep condition around loops we know have more than an iteration. This patch avoids generating those conditions. * graphite-isl-ast-to-gimple.c (graphite_create_new_loop_guard): Do not call create_empty_if_region_on_edge when cond_expr is true.

[PATCH 1/2] [graphite] add an upper limit on the number of array references

2015-10-21 Thread Sebastian Pop
* graphite-scop-detection.c (build_scops): Do not handle scops with more than PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP arrays. * params.def (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): New. --- gcc/graphite-scop-detection.c | 11 +++ gcc/params.def| 7 +++ 2

[PATCH 2/2] [graphite] a scalar depending on vdefs in the current region is not invariant

2015-10-21 Thread Sebastian Pop
When a scalar is defined in function of an array reference in the current scop, it does variate. Graphite cannot represent the condition in scop-11.c, as a[*] variates in the current region, and it is not an affine condition: for (j = 0; j <= 20; j++) a[j] = b + i; if (a[12] == 23) b

[PATCH] [graphite] improve debug of codegen

2015-11-03 Thread Sebastian Pop
From: Aditya Kumar - fix printing of ISL stmt and parameter names - move dot_scop* functions outside of anonymous namespace. * graphite-isl-ast-to-gimple.c: Include tree-cfg.h. (translate_isl_ast_node_user): Add more dumps: call print_loops_bb. * graphite-scop-detection.c (dot_all_scops_1)

[PATCH] remove parameter_rename_map

2015-11-04 Thread Sebastian Pop
This map was used in the transition to the new scop detection: with the new scop detection, we do not need this map anymore. * graphite-isl-ast-to-gimple.c (gcc_expression_from_isl_ast_expr_id): Remove use of parameter_rename_map. (copy_def): Remove. (copy_internal_para

[PATCH] enable loop fusion on isl-15

2015-11-05 Thread Sebastian Pop
* graphite-optimize-isl.c (optimize_isl): Call isl_options_set_schedule_maximize_band_depth. * gcc.dg/graphite/fuse-1.c: New. * gcc.dg/graphite/fuse-2.c: New. * gcc.dg/graphite/interchange-13.c: Remove bogus check. --- gcc/graphite-optimize-isl.c

[PATCH] [graphite] do not collect cold loops in scops

2015-11-05 Thread Sebastian Pop
* graphite-scop-detection.c (loop_is_valid_scop): Call optimize_loop_nest_for_speed_p. --- gcc/graphite-scop-detection.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c index ae8497d..f22e9cc 100644 ---

Re: [PATCH] Do not allow irreducible loops/regions in a scop

2015-11-06 Thread Sebastian Pop
On Thu, Nov 5, 2015 at 10:12 PM, Aditya Kumar wrote: > Irreducible regions are not going to be optimized by ISL > so discard them early. > > gcc/ChangeLog: > > 2015-11-06 Aditya Kumar > > * graphite-scop-detection.c (scop_detection::merge_sese): > (scop_detection::can_represent_

Re: improved RTL-level if conversion using scratchpads [half-hammock edition]

2015-11-06 Thread Sebastian Pop
On Fri, Nov 6, 2015 at 2:56 AM, Bernd Schmidt wrote: > Formatting problem, here and in a few other places. I didn't fully read the > patch this time around. > > I'm probably not reviewing further patches because I don't see this > progressing to a state where it's acceptable. Others may do so, but

Re: improved RTL-level if conversion using scratchpads [half-hammock edition]

2015-11-06 Thread Sebastian Pop
On Fri, Nov 6, 2015 at 6:32 AM, Bernd Schmidt wrote: > On 11/06/2015 03:10 PM, Sebastian Pop wrote: >> >> On Fri, Nov 6, 2015 at 2:56 AM, Bernd Schmidt wrote: >>> >>> Formatting problem, here and in a few other places. I didn't fully read >>> the &

[PATCH 2/2] add original schedule to scop

2015-11-06 Thread Sebastian Pop
From: Abderrazek Zaafrani * graphite-optimize-isl.c (optimize_isl): Call isl_union_map_is_equal. * graphite-poly.c (new_scop): Initialize original_schedule. (free_scop): Free original_schedule. * graphite-poly.h (struct scop): Add field original_schedule. * graphite-sese-to-po

[PATCH 1/2] [graphite] do not create unnecessary dimensions in scop scattering

2015-11-06 Thread Sebastian Pop
* graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Remove. (build_pbb_minimal_scattering_polyhedrons): New. (build_scop_scattering): Remove. (build_scop_minimal_scattering): New. (build_scop_scattering): Call build_pbb_minimal_scatt

[PATCH 2/2] [graphite] improve construction of the original schedule

2015-11-11 Thread Sebastian Pop
The patch builds the original schedule based on the now optimized scattering dimension instead of building one based on the loop index only. The implementation is simpler and catches more cases where the original schedule and the transformed schedule are the same, such as the one below: for (i =

[PATCH 1/2] [graphite] add testsuite automatic dg-options and dg-do action for isl-ast-gen-* and fuse-* files

2015-11-11 Thread Sebastian Pop
--- gcc/testsuite/gcc.dg/graphite/fuse-1.c | 10 +++--- gcc/testsuite/gcc.dg/graphite/fuse-2.c | 4 +--- gcc/testsuite/gcc.dg/graphite/graphite.exp | 2 ++ gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-1.c| 3 --- gcc/testsuite/gcc.dg/gr

Re: [PATCH 05/N] Fix memory leaks in graphite

2015-11-13 Thread Sebastian Pop
On Fri, Nov 13, 2015 at 6:15 AM, Richard Biener wrote: > On Fri, Nov 13, 2015 at 12:43 PM, Martin Liška wrote: >> Hello. >> >> Patch survives regbootstrap on x86_64-linux-gnu. >> Ready for trunk? Thanks Martin for the patch. Sebastian > > Ok. > > Richard. > >> Thanks, >> Martin

Re: [PATCH] Preserve the original program while using graphite

2015-11-13 Thread Sebastian Pop
On Fri, Nov 13, 2015 at 3:08 PM, Tom de Vries wrote: > On 11/11/15 23:54, Aditya Kumar wrote: >> >> Earlier, graphite used to translate portions of the original program after >> scop-detection in order to represent the SCoP into polyhedral model. This >> was >> required because each basic block w

Re: [PATCH] Add clang-format config to contrib folder

2015-11-18 Thread Sebastian Pop
Martin, thanks for getting this patch out. I like the patch. Jeff, clang-format has scripts that allow formatting only the lines touched by a patch. It also has a script to integrate with git: https://llvm.org/svn/llvm-project/cfe/trunk/tools/clang-format/git-clang-format We could use those script

Re: [PATCH 1/2] [graphite] Move codegen related functions to graphite-isl-ast-to-gimple.c

2015-11-19 Thread Sebastian Pop
Fixed in r230625. David, please test on your systems, we were not able to reproduce the fails on x86_64-linux: the linker does optimize away the functions that are not used. Thanks, Sebastian Aditya K wrote: > Thanks for the update. I'll fix that asap. > > > -Aditya > > > ---

[PATCH] fix PR68341: correctly compute the insertion point for close phi nodes

2015-11-19 Thread Sebastian Pop
--- gcc/graphite-isl-ast-to-gimple.c | 96 ++-- 1 file changed, 62 insertions(+), 34 deletions(-) diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c index 3e0907d..91bda33 100644 --- a/gcc/graphite-isl-ast-to-gimple.c +++ b/gcc/gra

[PATCH] fix PR68428: ignore bb dominated by the scop->exit

2015-11-19 Thread Sebastian Pop
--- gcc/graphite-scop-detection.c | 6 +- gcc/testsuite/gcc.dg/graphite/pr68428.c | 23 +++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/graphite/pr68428.c diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-sco

[PATCH] add testcase for PR68335

2015-11-19 Thread Sebastian Pop
--- gcc/testsuite/gfortran.dg/graphite/pr68335.f90 | 45 ++ 1 file changed, 45 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/graphite/pr68335.f90 diff --git a/gcc/testsuite/gfortran.dg/graphite/pr68335.f90 b/gcc/testsuite/gfortran.dg/graphite/pr68335.f90 new

Re: [PATCH] GCC system.h and Graphite header order

2015-11-21 Thread Sebastian Pop
On Sat, Nov 21, 2015 at 4:03 PM, David Edelsohn wrote: > Graphite relies on the ISL library and includes multiple ISL headers. > The ISL headers refer to identifiers that are poisoned for use in GCC. > The source files for Graphite were organized to include the ISL > headers first, to avoid the id

[PATCH 3/3] [graphite] fix PR68493: bail out when codegen_error is set

2015-11-23 Thread Sebastian Pop
--- gcc/graphite-isl-ast-to-gimple.c| 2 ++ gcc/testsuite/gcc.dg/graphite/pr68493.c | 34 + 2 files changed, 36 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/graphite/pr68493.c diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-t

[PATCH 1/3] [graphite] call update_ssa once

2015-11-23 Thread Sebastian Pop
--- gcc/graphite-isl-ast-to-gimple.c | 9 - gcc/sese.c | 4 2 files changed, 13 deletions(-) diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c index 557c44c..30c3a21 100644 --- a/gcc/graphite-isl-ast-to-gimple.c +++ b/gcc/graphite-

[PATCH 2/3] [graphite] fix PR68279: bail out when scev gets instantiated to not_known

2015-11-23 Thread Sebastian Pop
- scop->poly_scop_p = true; + return true; } #endif /* HAVE_isl */ diff --git a/gcc/graphite-sese-to-poly.h b/gcc/graphite-sese-to-poly.h deleted file mode 100644 index 48f0d56..0000000 --- a/gcc/graphite-sese-to-poly.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Conversion of SESE regions to Polyhed

[PATCH] [graphite] fix PR68314: revert all patches touching the construction of the original schedule

2015-11-23 Thread Sebastian Pop
--- gcc/graphite-optimize-isl.c | 20 +--- gcc/graphite-poly.c | 2 - gcc/graphite-poly.h | 3 - gcc/graphite-sese-to-poly.c | 235 ++-- 4 files changed, 58 insertions(+), 202 deletions(-) diff --git a/gcc/graphite-optimize-isl.c b/gcc/

[PATCH 2/2] [graphite] fix PR67984: check for constants in rename map

2015-11-24 Thread Sebastian Pop
--- gcc/graphite-isl-ast-to-gimple.c| 98 - gcc/testsuite/gcc.dg/graphite/pr67984.c | 17 ++ 2 files changed, 77 insertions(+), 38 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/graphite/pr67984.c diff --git a/gcc/graphite-isl-ast-to-gimple.c b/g

[PATCH 1/2] [graphite] move all declarations to a same .h file

2015-11-24 Thread Sebastian Pop
h" +#include "graphite.h" #define OPENSCOP_MAX_STRING 256 diff --git a/gcc/graphite-poly.h b/gcc/graphite-poly.h deleted file mode 100644 index d396d3f..000 --- a/gcc/graphite-poly.h +++ /dev/null @@ -1,466 +0,0 @@ -/* Graphite polyhedral representation. - Copyright (C) 2009

[PATCH] [graphite] fix PR68453: recursively add phi nodes to merge points

2015-11-25 Thread Sebastian Pop
The patch adds close phi nodes to every outer loop exit, and to every loop guard. For loop guards it computes an initial value that determines where we stop inserting phi nodes. When the initial value is a constant, the initial value is considered to be defined in the entry of the code gen region

[PATCH 1/2] [graphite] always print parameter names as P_{SSA_NAME_VERSION}

2015-11-30 Thread Sebastian Pop
--- gcc/graphite-isl-ast-to-gimple.c | 4 ++-- gcc/graphite-scop-detection.c | 31 --- gcc/graphite-sese-to-poly.c | 16 +++- gcc/testsuite/gcc.dg/graphite/pr35356-1.c | 2 +- 4 files changed, 22 insertions(+), 31 deletio

[PATCH 2/2] [graphite] check for ISL generated code that leads to division by zero

2015-11-30 Thread Sebastian Pop
we used to generate modulo and division by zero because ISL uses big numbers which translate to zero in modulo arithmetic. The patch also improves error handling and bails out early in case of wrong code gen. --- gcc/graphite-isl-ast-to-gimple.c | 85 +++- 1 f

[PATCH 2/2] [graphite] fix invalid bounds on array refs

2015-12-02 Thread Sebastian Pop
While enabling graphite in -O3 we found a Fortran testcase that fails because the max of the type domain is -1. We used to add that as a constraint to the elements accessed by the array, leading to a unfeasible constraint: 0 <= i <= -1. Having that constraint, drops the data reference as that say

[PATCH 1/2] [graphite] rename flag_loop_optimize_isl to flag_loop_nest_optimize

2015-12-02 Thread Sebastian Pop
--- gcc/common.opt | 2 +- gcc/graphite-poly.c | 2 +- gcc/graphite.c | 2 +- gcc/toplev.c| 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/common.opt b/gcc/common.opt index e1617c4..e593631 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -1379,7 +137

[PATCH] [graphite] fix PR68550: do not handle ISL loop peeled statements

2015-12-02 Thread Sebastian Pop
In case ISL did some loop peeling, like this: S_8(0); for (int c1 = 1; c1 <= 5; c1 += 1) { S_8(c1); } S_8(6); we should not copy loop-phi nodes in S_8(0) or in S_8(6). * graphite-isl-ast-to-gimple.c (copy_loop_phi_nodes): Add dump. (copy_bb_and_scalar_dependences): Do

[PATCH] [graphite] do not insert code outside the generated region

2015-12-02 Thread Sebastian Pop
on the testcase we used to generate code in the function entry bb_0, and that choked the cfg verifier. * graphite-isl-ast-to-gimple.c (copy_bb_and_scalar_dependences): Check that insertion point is still in the region. * gfortran.dg/graphite/id-26.f03: New. --- gcc/graphi

[PATCH] [graphite] handle missing isl_ast_expr

2015-12-02 Thread Sebastian Pop
>From ISL's documentation, isl_ast_op_zdiv_r is equal to zero iff the remainder on integer division is zero. Code generate a modulo operation for that. * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Handle isl_ast_op_zdiv_r. (gcc_expression_from_isl_expr_op): Same.

Re: [PATCH 2/2] [graphite] fix invalid bounds on array refs

2015-12-03 Thread Sebastian Pop
Richard Biener wrote: > On Wed, Dec 2, 2015 at 10:36 PM, Sebastian Paul Pop wrote: > > Do you recommend that we add a gcc_assert that min is always lower than max? > > No, min can be one less than max if the array has size zero. Maybe a typo: do you mean max can be one less than min? If the arr

Re: [Patch, Contrib] Download ISL 0.15 by download_prerequisites

2015-12-04 Thread Sebastian Pop
LGTM. Thanks! Tobias Burnus wrote: > If there are no objections, I intent to commit the following patch > tomorrow as obvious. > > Tobias > > On Tue, Oct 27, 2015 at 11:27:41AM +0100, Tobias Burnus wrote: > > recently, support for ISL 0.15 was added to GCC and also > > ftp://gcc.gnu.org/pub/gcc

Re: [PATCH] enable loop fusion on isl-15

2015-12-09 Thread Sebastian Pop
ks, > Richard. > > > Thanks, > > Sebastian > > > > -Original Message----- > > From: Mike Stump [mailto:mikest...@comcast.net] > > Sent: Friday, December 04, 2015 12:03 PM > > To: Alan Lawrence > > Cc: Sebastian Pop; seb...@gmail.com; gcc-pat

[PATCH 3/3] [graphite] specify more isl codegen options

2015-12-09 Thread Sebastian Pop
--- gcc/graphite-optimize-isl.c | 8 1 file changed, 8 insertions(+) diff --git a/gcc/graphite-optimize-isl.c b/gcc/graphite-optimize-isl.c index f90fcfd..50f2b3c 100644 --- a/gcc/graphite-optimize-isl.c +++ b/gcc/graphite-optimize-isl.c @@ -50,6 +50,7 @@ along with GCC; see the file COP

[PATCH 2/3] [graphite] add array access function in the right order

2015-12-09 Thread Sebastian Pop
we used to add the access functions in the wrong order, Fortran style, leading to unprofitable interchanges. --- gcc/graphite-sese-to-poly.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c index 887c212..480c552 100644

[PATCH 1/3] [graphite] dump param name when timing out

2015-12-09 Thread Sebastian Pop
--- gcc/graphite-optimize-isl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/graphite-optimize-isl.c b/gcc/graphite-optimize-isl.c index 8727e39..f90fcfd 100644 --- a/gcc/graphite-optimize-isl.c +++ b/gcc/graphite-optimize-isl.c @@ -426,7 +426,7 @@ optimize_isl (scop_p s

[PATCH 2/2] [graphite] update required isl versions

2015-12-10 Thread Sebastian Pop
we now check the isl version, as there are no real differences in existing files in between isl 0.14 and isl 0.15. --- config/isl.m4 | 41 +++-- configure | 112 -- 2 files changed, 123 insertions(+), 30 deletions(-) dif

[PATCH 1/2] [graphite] document minimal required version for isl

2015-12-10 Thread Sebastian Pop
also update ISL to isl as requested by its author Sven Verdoolaege. --- gcc/doc/install.texi | 9 + gcc/doc/invoke.texi | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 0b71bef..b43a3ec 100644 --- a/gcc/doc/install.

Re: [PATCH][GRAPHITE] Fix PR79483

2017-06-09 Thread Sebastian Pop
On Wed, Jun 7, 2017 at 4:46 AM, Richard Biener wrote: > > When the order of visiting dominator children in domwalk changed > GRAPHITE falls foul of relying on a particular order BBs are visited > when computing the original schedule from the vector of pbbs. > > The following restores an order that

Re: RFC: Patch for switch elimination (PR 54742)

2014-08-13 Thread Sebastian Pop
Steve Ellcey wrote: > +/* This file implements an optimization where, when a variable is set > + to a constant value and there is a path that leads from that definition > + to a switch statement that uses that variable as its controlling > expression > + we duplicate the blocks on this path

Re: RFC: Patch for switch elimination (PR 54742)

2014-08-13 Thread Sebastian Pop
Jeff Law wrote: > I'm pretty sure jump threading *could* handle it, but after looking > at the full testcase when it was posted, I'm not sure it's *wise* to > handle this in jump threading. Thanks for clearing my doubts. Sebastian

Re: [PATCH 2/3]Improve induction variable elimination

2014-08-14 Thread Sebastian Pop
Bin.Cheng wrote: > >> The overflow check can be improved by using deeper inspection to prove the > >> equality. This patch deals with that by making below two improvements: > >> a) Handles constant cases. > >> b) Uses affine expansion as deeper inspection to check the equality. Looks good to

Re: [PATCH] Fix PR62081

2014-08-14 Thread Sebastian Pop
Richard Biener wrote: > > The following fixes missing dominator computation before fixing loops. > Rather than doing even more such weird stuff in a pass gate function > this puts this into a new pass scheduled before the loop passes gate. > Ok. > +unsigned int > +pass_fix_loops::execute (funct

  1   2   3   4   5   >