aboutsummaryrefslogtreecommitdiff
path: root/gcc/graphite-sese-to-poly.c
AgeCommit message (Collapse)AuthorFilesLines
2010-05-06Replace Value with mpz_tAndreas Simbuerger1-18/+18
2010-04-12 Andreas Simbuerger <simbuerg@fim.uni-passau.de> * graphite-blocking.c (pbb_strip_mine_profitable_p): Replace Value with mpz_t. * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same. (precision_for_value): Same. (precision_for_interval): Same. (gcc_type_for_interval): Same. (graphite_create_new_guard): Same. (compute_bounds_for_level): Same. (graphite_create_new_loop_guard): Same. * graphite-interchange.c (build_linearized_memory_access): Same. (pdr_stride_in_loop): Same. (memory_strides_in_loop_1): Same. (memory_strides_in_loop): Same. (extend_scattering): Same. (psct_scattering_dim_for_loop_depth): Same. (pbb_number_of_iterations): Same. * graphite-poly.h (debug_iteration_domains): Same. * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same. (ppl_set_inhomogeneous_gmp): Same. (ppl_strip_loop): Same. (ppl_lexico_compare_linear_expressions): Same. (ppl_read_polyhedron_matrix): Same. (ppl_max_for_le_pointset): Same. * graphite-ppl.h (ppl_read_polyhedron_matrix): Same. (tree_int_to_gmp): Same. (gmp_cst_to_tree): Same. (ppl_set_inhomogeneous): Same. (ppl_set_inhomogeneous_tree): Same. (ppl_set_coef): Same. (ppl_set_coef_tree): Same. * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same. (build_scop_scattering): Same. (scan_tree_for_params_right_scev): Same. (scan_tree_for_params): Same. (find_params_in_bb): Same. (find_scop_parameters): Same. (add_upper_bounds_from_estimated_nit): Same. (build_loop_iteration_domains): Same. (add_condition_to_domain): Same. (pdr_add_memory_accesses): Same. From-SVN: r159133
2010-05-06Resolve CLooG's value_* macros to their respective mpz_* counterparts.Andreas Simbuerger1-57/+57
2010-04-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de> * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve CLooG's value_* macros to their respective mpz_* counterparts. * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same. (graphite_create_new_loop_guard): Same. * graphite-interchange.c (build_linearized_memory_access): Same. (pdr_stride_in_loop): Same. (memory_strides_in_loop_1): Same. (1st_interchange_profitable_p): Same. * graphite-poly.c (extend_scattering): Same. (psct_scattering_dim_for_loop_depth): Same. (pbb_number_of_iterations): Same. (pbb_number_of_iterations_at_time): Same. * graphite-poly.h (new_1st_loop): Same. * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same. (oppose_constraint): Same. (insert_constraint_into_matrix): Same. (ppl_set_inhomogeneous_gmp): Same. (ppl_set_coef_gmp): Same. (ppl_strip_loop): Same. (ppl_lexico_compare_linear_expressions): Same. (ppl_max_for_le_pointset): Same. (ppl_min_for_le_pointset): Same. (ppl_build_realtion): Same. * graphite-ppl.h (gmp_cst_to_tree): Same. (ppl_set_inhomogeneous): Same. (ppl_set_inhomogeneous_tree): Same. (ppl_set_coef): Same. (ppl_set_coef_tree): Same. * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same. (build_scop_scattering): Same. (add_value_to_dim): Same. (scan_tree_for_params_right_scev): Same. (scan_tree_for_params_int): Same. (scan_tree_for_params): Same. (find_params_in_bb): Same. (find_scop_parameters): Same. (add_upper_bounds_from_estimated_nit): Same. (build_loop_iteration_domains): Same. (create_linear_expr_from_tree): Same. (add_condition_to_domain): Same. (pdr_add_memory_accesses): Same. From-SVN: r159132
2010-04-06Compute min and max bounds for IVs and infer types.Sebastian Pop1-4/+0
2010-04-04 Sebastian Pop <sebastian.pop@amd.com> PR middle-end/43519 * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h. * graphite-clast-to-gimple.c: Include langhooks.h. (max_signed_precision_type): New. (max_precision_type): Takes two types as arguments. (precision_for_value): New. (precision_for_interval): New. (gcc_type_for_interval): New. (gcc_type_for_value): New. (gcc_type_for_clast_term): New. (gcc_type_for_clast_red): New. (gcc_type_for_clast_bin): New. (gcc_type_for_clast_expr): Split up into several functions. (gcc_type_for_clast_eq): Rewritten. (compute_bounds_for_level): New. (compute_type_for_level_1): New. (compute_type_for_level): New. (gcc_type_for_cloog_iv): Removed. (gcc_type_for_iv_of_clast_loop): Rewritten. (graphite_create_new_loop): Compute the lower and upper bound types with gcc_type_for_clast_expr. (graphite_create_new_loop_guard): Same. (find_cloog_iv_in_expr): Removed. (compute_cloog_iv_types_1): Removed. (compute_cloog_iv_types): Removed. (gloog): Do not call compute_cloog_iv_types. * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize GBB_CLOOG_IV_TYPES. (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES. * sese.h (struct gimple_bb): Removed field cloog_iv_types. (GBB_CLOOG_IV_TYPES): Removed. * gcc.dg/graphite/run-id-pr42644.c: Call abort. From-SVN: r158026
2010-04-06Add extra checks for places assuming one argument loop close SSA form.Sebastian Pop1-0/+13
2010-04-01 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that gimple_phi_num_args of the loop close SSA phi node is equal to 1. (detect_commutative_reduction): Same. From-SVN: r158025
2010-04-06Avoid calling verify_ssa twice in verify_loop_closed_ssa.Sebastian Pop1-6/+3
2010-04-06 Sebastian Pop <sebastian.pop@amd.com> * graphite-clast-to-gimple.c (graphite_verify): Remove redundant call to verify_ssa. Invoke verify_loop_closed_ssa with an extra argument. * graphite-scop-detection.c (canonicalize_loop_closed_ssa_form): Same. * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Same. (rewrite_commutative_reductions_out_of_ssa): Same. * passes.c (execute_function_todo): Call verify_ssa for every pass in the LNO. Invoke verify_loop_closed_ssa with an extra argument. * tree-flow.h (verify_loop_closed_ssa): Update declaration. * tree-parloops.c (parallelize_loops): Invoke verify_loop_closed_ssa with an extra argument. * tree-ssa-loop-manip.c (check_loop_closed_ssa_stmt): Same. Call verify_ssa only when the extra argument is true. (gimple_duplicate_loop_to_header_edge): Invoke verify_loop_closed_ssa with an extra argument. (tree_transform_and_unroll_loop): Same. From-SVN: r158021
2010-04-05graphite-sese-to-poly.c (translate_scalar_reduction_to_array): Initialize ↵Matthias Klose1-1/+1
variable. 2010-04-04 Matthias Klose <doko@ubuntu.com> * graphite-sese-to-poly.c (translate_scalar_reduction_to_array): Initialize variable. From-SVN: r157965
2010-04-02Make-lang.in, [...]: Update copyright years.Steven Bosscher1-1/+1
* ada/gcc-interface/Make-lang.in, alias.c, attribs.c, auto-inc-dec.c, basic-block.h, bb-reorder.c, calls.c, c-common.c, cgraph.h, collect2.h, config/alpha/alpha.c, config/alpha/alpha.md, config/alpha/predicates.md, config/arm/arm.md, config/arm/lib1funcs.asm, config/arm/neon-schedgen.ml, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin.c, config/darwin9.h, config/darwin.c, config/darwin.h, config/h8300/h8300.c, config/i386/cpuid.h, config/i386/cygming.h, config/i386/cygwin.h, config/i386/mingw32.h, config/i386/msformat-c.c, config/i386/sol2-10.h, config/i386/xopintrin.h, config/ia64/ia64.c, config/ia64/ia64.md, config/ia64/sync.md, config/mep/mep.c, config/mips/mips.md, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/pa/pa.c, config/pa/pa.md, config/rs6000/aix.h, config/rs6000/dfp.md, config/rs6000/rs6000-builtin.def, config/rs6000/rs6000-c.c, config/rs6000/vector.md, config/rtems.h, config/rx/rx.md, config/s390/s390.md, config/sol2-c.c, config/sparc/sol2-bi.h, config/sparc/sol2-gas.h, config/sparc/sparc.h, config/sparc/sparc.md, config/sparc/sparc-protos.h, config/spu/spu.c, config/spu/spu-c.c, config/t-darwin, convert.c, c.opt, c-opts.c, cp/Make-lang.in, c-pretty-print.c, c-typeck.c, df-core.c, df-scan.c, diagnostic.c, diagnostic.h, doc/cppopts.texi, doc/cpp.texi, doc/extend.texi, doc/gimple.texi, doc/languages.texi, doc/plugins.texi, doc/rtl.texi, doc/standards.texi, doc/tree-ssa.texi, doc/trouble.texi, dominance.c, fold-const.c, fortran/Make-lang.in, fwprop.c, gcc-plugin.h, gensupport.c, gimple.h, gimple-iterator.c, graphite.c, graphite-clast-to-gimple.c, graphite-clast-to-gimple.h, graphite-dependences.c, graphite-poly.c, graphite-poly.h, graphite-ppl.c, graphite-ppl.h, graphite-scop-detection.c, graphite-sese-to-poly.c, graphite-sese-to-poly.h, ifcvt.c, intl.c, intl.h, ipa.c, ipa-cp.c, ipa-inline.c, ipa-prop.c, ipa-prop.h, ipa-pure-const.c, ipa-reference.c, ipa-type-escape.c, ira-color.c, ira-conflicts.c, ira-lives.c, java/Make-lang.in, lambda-code.c, loop-invariant.c, lto/Make-lang.in, lto-streamer.h, lto-streamer-in.c, objc/Make-lang.in, objcp/Make-lang.in, omp-low.c, optc-gen.awk, opt-functions.awk, opth-gen.awk, params.def, passes.c, postreload-gcse.c, print-tree.c, recog.c, regrename.c, reload.h, rtl.def, sched-int.h, sched-rgn.c, sel-sched-dump.c, sese.c, sese.h, store-motion.c, stor-layout.c, tree-cfgcleanup.c, tree-chrec.c, tree-complex.c, tree-data-ref.c, tree.def, tree-eh.c, tree-flow.h, tree-flow-inline.h, tree.h, tree-loop-distribution.c, tree-outof-ssa.c, tree-parloops.c, tree-pass.h, tree-predcom.c, tree-profile.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-alias.c, tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-loop-im.c, tree-ssa-loop-ivcanon.c, tree-ssa-loop-manip.c, tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-pre.c, tree-ssa-sccvn.c, tree-ssa-structalias.c, tree-ssa-uncprop.c, tree-tailcall.c, tree-vect-data-refs.c, tree-vect-loop.c, tree-vectorizer.h, tree-vect-slp.c, tree-vrp.c, unwind-dw2-fde-darwin.c, varpool.c: Update copyright years. From-SVN: r157950
2010-03-31canonicalize_loop_ivs should add the IV bump in loop->header.Sebastian Pop1-2/+2
2010-03-16 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump in loop->header. * tree-flow.h (canonicalize_loop_ivs): Updated declaration. * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch. * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter to switch between adding the IV bump in loop->latch or in loop->header. From-SVN: r157885
2010-03-16graphite-sese-to-poly.c (split_reduction_stmt): Skip debug statements before ↵Aldy Hernandez1-1/+1
splitting block. * graphite-sese-to-poly.c (split_reduction_stmt): Skip debug statements before splitting block. From-SVN: r157494
2010-03-15graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Skip debug statements.Aldy Hernandez1-1/+2
* graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Skip debug statements. From-SVN: r157465
2010-03-13Fix PR43354: Correctly handle default definitions.Sebastian Pop1-1/+2
2010-03-13 Sebastian Pop <sebastian.pop@amd.com> PR middle-end/43354 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not call insert_out_of_ssa_copy for default definitions. * gfortran.dg/graphite/id-pr43354.f: New. From-SVN: r157440
2010-03-13Use ssizetype when long_long_integer_type_node is NULL.Sebastian Pop1-1/+5
2010-03-11 Sebastian Pop <sebastian.pop@amd.com> * graphite-clast-to-gimple.c (my_long_long): Defined. (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node. * graphite-sese-to-poly.c (my_long_long): Defined. (scop_ivs_can_be_represented): Use it. From-SVN: r157438
2010-03-13Cleanup: remove FIXMEs, add new function.Sebastian Pop1-58/+70
2010-03-10 Sebastian Pop <sebastian.pop@amd.com> * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove forward declaration. * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment. (add_upper_bounds_from_estimated_nit): New. (build_loop_iteration_domains): Use it. From-SVN: r157436
2010-03-13Make build_poly_scop not return a bool.Sebastian Pop1-7/+7
2010-03-09 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (build_poly_scop): Do not return bool. * graphite-sese-to-poly.h (build_poly_scop): Same. From-SVN: r157432
2010-03-13Limit the number of parameters per SCoP.Sebastian Pop1-0/+5
2010-03-09 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (build_poly_scop): Limit scops following the number of parameters in the scop. Use as an upper bound PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS. * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared. * doc/invoke.texi: Document it. From-SVN: r157431
2010-03-08Use {lower,upper}_bound_in_type.Sebastian Pop1-10/+9
2010-03-05 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (add_param_constraints): Use lower_bound_in_type and upper_bound_in_type. From-SVN: r157291
2010-03-08Use sizetype instead of unsigned_type_node.Sebastian Pop1-2/+2
2010-03-05 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (add_param_constraints): Use sizetype instead of unsigned_type_node. From-SVN: r157290
2010-03-08Fix PR43065: Insert bounds on pointer type parameters.Sebastian Pop1-6/+12
2010-03-05 Sebastian Pop <sebastian.pop@amd.com> Reza Yazdani <reza.yazdani@amd.com> PR middle-end/43065 * graphite-sese-to-poly.c (add_param_constraints): Insert bounds on pointer type parameters. * gcc.dg/graphite/run-id-4.c: New. Co-Authored-By: Reza Yazdani <reza.yazdani@amd.com> From-SVN: r157289
2010-03-08Fix type problems in loop ivs.Tobias Grosser1-0/+36
Fix pr42644. Fix pr42130 (dealII). 2010-03-03 Tobias Grosser <grosser@fim.uni-passau.de> * gcc/graphite-clast-to-gimple.c (clast_to_gcc_expression): Also handle conversions from pointer to integers. (gcc_type_for_cloog_iv): Choose the smalles signed integer as an induction variable, to be able to work with code generated by CLooG. * gcc/graphite-sese-to-poly.c (scop_ivs_can_be_represented): New. (build_poly_scop): Bail out if we cannot codegen a loop. * gcc/testsuite/gcc.dg/graphite/id-18.c: New. * gcc/testsuite/gcc.dg/graphite/run-id-pr42644.c: New. * libgomp/testsuite/libgomp.graphite/force-parallel-1.c: Adjust. * libgomp/testsuite/libgomp.graphite/force-parallel-2.c: Adjust. From-SVN: r157286
2010-03-08Add constraints on the type of parameters to the scop context.Sebastian Pop1-3/+0
2010-02-23 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove early return. From-SVN: r157278
2010-02-11Fix PR42914 and PR42530.Sebastian Pop1-6/+37
2010-02-10 Sebastian Pop <seb@napoca> PR middle-end/42914 PR middle-end/42530 * graphite-sese-to-poly.c (remove_phi): New. (translate_scalar_reduction_to_array): Call remove_phi. * gcc.dg/graphite/pr42530.c: New. * gcc.dg/graphite/pr42914.c: New. From-SVN: r156712
2010-02-11re PR tree-optimization/42771 ([graphite] ICE: in graphite_loop_normal_form, ↵Sebastian Pop1-0/+1
at graphite-sese-to-poly.c (2)) Fix PR42771. 2010-02-10 Sebastian Pop <seb@napoca> PR middle-end/42771 * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters. * graphite-clast-to-gimple.h (gloog): Update declaration. * graphite-poly.c (new_scop): Clear POLY_SCOP_P. * graphite-poly.h (struct poly_bb): Add missing comments. (struct scop): Add poly_scop_p field. (POLY_SCOP_P): New. * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P. * graphite.c (graphite_transform_loops): Build the polyhedral representation for each scop before code generation. * sese.c (rename_variables_in_operand): Removed. (rename_variables_in_expr): Return the renamed expression. (rename_sese_parameters): New. * sese.h (rename_sese_parameters): Declared. * gcc.dg/graphite/pr42771.c: New. From-SVN: r156711
2009-12-30re PR other/42537 ([PATCH] misc spelling fixes)Robert Millan1-1/+1
/gcc 2009-12-30 Robert Millan <rmh.gcc@aybabtu.com> PR other/42537 * errors.c: Fix typo in comment. * graphite-sese-to-poly.c: Likewise. * profile.c (is_inconsistent): Fix typo in string. /libjava 2009-12-30 Robert Millan <rmh.gcc@aybabtu.com> PR other/42537 * classpath/java/rmi/activation/Activatable.java: Fix typos in comment. From-SVN: r155518
2009-12-23re PR middle-end/42180 (compiling induct.f90 with -ffast-math -O2 ↵Sebastian Pop1-1/+2
-fgraphite-identity ICEs gfortran) Fix PR42180. 2009-12-18 Sebastian Pop <sebastian.pop@amd.com> PR middle-end/42180 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle GIMPLE_CALL. * testsuite/gfortran.dg/graphite/pr42180.f90: Add compile flags. From-SVN: r155423
2009-12-23re PR middle-end/42180 (compiling induct.f90 with -ffast-math -O2 ↵Sebastian Pop1-0/+3
-fgraphite-identity ICEs gfortran) Fix PR42180. 2009-12-18 Sebastian Pop <sebastian.pop@amd.com> PR middle-end/42180 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks that contain only one statement. From-SVN: r155422
2009-12-23re PR tree-optimization/42205 ([graphite] internal compiler error: ↵Sebastian Pop1-2/+5
verify_ssa failed with -ffast-math -floop-interchange) Fix PR42205. 2009-12-17 Sebastian Pop <sebastian.pop@amd.com> PR middle-end/42205 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt): Insert the reduction copy in the same block as the phi node. (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs. * testsuite/gcc.dg/graphite/pr42205-1.c: New. * testsuite/gcc.dg/graphite/pr42205-2.c: New. From-SVN: r155419
2009-12-15re PR tree-optimization/42185 ([graphite] expected ↵Aldy Hernandez1-2/+10
gimple_assign(error_mark), have gimple_call() in gimple_assign_rhs_code, at gimple.h:1820) PR graphite/42185 * graphite-sese-to-poly.c (is_reduction_operation_p): Assert that we are a GIMPLE_ASSIGN. Do not calculate rhs code twice. (follow_ssa_with_commutative_ops): Return NULL on non assignment. From-SVN: r155256
2009-12-14re PR tree-optimization/42284 (failing tree check in ↵Sebastian Pop1-13/+21
graphite-sese-to-poly.c for 164.gzip) Fix PR42284. 2009-12-12 Sebastian Pop <sebpop@gmail.com> PR middle-end/42284 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs. (detect_commutative_reduction_arg): Simplified. (detect_commutative_reduction): Early return when the argument of the close phi is not of an SSA_NAME. * testsuite/gcc.dg/graphite/pr42284.c: New. From-SVN: r155218
2009-11-30Do not abuse sese for codegenerationTobias Grosser1-23/+0
CLooG automatically frees the names list, so sharing SESE_PARAMS_NAMES between gloog() and debug_generated_program() leads to freeing them twice. As both SESE_PARAM_NAMES and SESE_PARAMS_INDEX are code generation data structures remove them and the functions working on them from sese.h and put them in clast-to-gimple. 2009-11-21 Tobias Grosser <grosser@fim.uni-passau.de> * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index, clast_name_to_index, save_clast_name_index, debug_clast_name_index, debug_clast_name_indexes_1, debug_clast_name_indexes, clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h. (clast_name_to_gcc, clast_to_gcc_expression, clast_to_gcc_expression_red, gcc_type_for_clast_expr, gcc_type_for_clast_eq, graphite_translate_clast_equation, graphite_create_guard_cond_expr, graphite_create_new_loop, translate_clast): Add params_index. (initialize_cloog_names): Create parameter strings from scratch, do not reference other strings. (create_params_index): New. (gloog): Initialize params_index. * graphite-scop-detection (free_scops_1): Removed. (limit_scops): Use normal free_scops. * graphite-sese-to-poly.c (save_var_names): Removed. (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES and SESE_PARAMS_INDEX. * sese.c (new_sese, free_sese): Dito. * sese.h (struct sese): Remove params_index, params_names. (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed. From-SVN: r154844
2009-11-25graphite-clast-to-gimple.c (gloog): Do not call sese_reset_aux_in_loops.Sebastian Pop1-14/+18
2009-10-26 Sebastian Pop <sebastian.pop@amd.com> * graphite-clast-to-gimple.c (gloog): Do not call sese_reset_aux_in_loops. * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an extra argument for domains. Do not use loop->aux. (build_scop_iteration_domain): Initialize and free domains, pass it to build_loop_iteration_domains and extract the information from domains. Do not use loop->aux. * sese.c (sese_reset_aux_in_loops): Removed. * sese.h (sese_reset_aux_in_loops): Removed. From-SVN: r154627
2009-11-25cfgloop.c (alloc_loop): Initialize loop->single_iv.Sebastian Pop1-0/+40
2009-10-22 Sebastian Pop <sebastian.pop@amd.com> * cfgloop.c (alloc_loop): Initialize loop->single_iv. * cfgloop.h (struct loop): New field single_iv. * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use loop->aux anymore: use loop->single_iv. (graphite_loop_normal_form): Moved... (build_graphite_loop_normal_form): Removed. (gloog): Do not call build_graphite_loop_normal_form. (free_aux_in_new_loops): Moved... (mark_loops_parallel): Restructure. * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare. * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here. (scop_canonicalize_loops): New. (build_poly_scop): Call scop_canonicalize_loops. * graphite.c (free_aux_in_new_loops): ...here. From-SVN: r154624
2009-11-25graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra argument ↵Sebastian Pop1-6/+8
base_name. 2009-10-22 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra argument base_name. (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array. (rewrite_phi_out_of_ssa): Same. (rewrite_cross_bb_scalar_deps): Same. (translate_scalar_reduction_to_array): Same. From-SVN: r154621
2009-11-25graphite-sese-to-poly.c (dump_alias_graphs): New.Sebastian Pop1-31/+38
2009-10-22 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (dump_alias_graphs): New. (build_scop_drs): Call dump_alias_graphs. From-SVN: r154619
2009-11-25graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.Sebastian Pop1-10/+15
2009-10-20 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting. (pdr_add_alias_set): Same. (build_poly_dr): Same. (build_alias_set_optimal_p): Same. (build_base_obj_set_for_drs): Same. Do not store the result of graphds_dfs. From-SVN: r154616
2009-11-25graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize ↵Sebastian Pop1-1/+2
all_components_are_cliques to 1. 2009-10-20 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize all_components_are_cliques to 1. From-SVN: r154615
2009-11-25graphite-sese-to-poly.c (free_data_refs_aux): Update to free the new structure.Li Feng1-39/+74
2009-10-20 Li Feng <nemokingdom@gmail.com> * graphite-sese-to-poly.c (free_data_refs_aux): Update to free the new structure. (pdr_add_alias_set): Update retrieving alias_set_num. (build_poly_dr): Update retrieving dr_base_object_set. (partition_drs_to_sets): Remove. (build_alias_set_optimal_p): New. (build_alias_set_for_drs): Rename. (build_scop_drs): Update. * graphite-sese-to-poly.h (struct base_alias_pair): New. (ALIAS_SET_INDEX): Remove. (BASE_OBJECT_SET_INDEX): Remove. From-SVN: r154614
2009-11-25graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer loop upper ↵Sebastian Pop1-4/+6
bounds for 1-element arrays at end of structures. 2009-10-20 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer loop upper bounds for 1-element arrays at end of structures. * tree-flow.h (array_at_struct_end_p): Declared. * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore. From-SVN: r154612
2009-11-25graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize ↵Alexander Monakov1-26/+25
construction of parameter constraints from loop iteration analysis. 2009-10-20 Alexander Monakov <amonakov@ispras.ru> * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize construction of parameter constraints from loop iteration analysis. * gcc.dg/graphite/run-id-2.c: New test. From-SVN: r154610
2009-11-25graphite-sese-to-poly.c (find_scop_parameters): Initialize SCOP_CONTEXT.Sebastian Pop1-1/+69
2009-10-17 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (find_scop_parameters): Initialize SCOP_CONTEXT. (build_loop_iteration_domains): Extract bounds on parameters based on the data size. (build_scop_context): Do not initialize SCOP_CONTEXT; add new constraints. From-SVN: r154601
2009-11-25re PR middle-end/41193 (slow compilation with graphite / ice with graphite)Sebastian Pop1-4/+8
2009-10-15 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge. (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts, and check the SSA representation. * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193. From-SVN: r154590
2009-11-25graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix Comment.Ramakrishna Upadrasta1-18/+139
2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr> * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix Comment. (write_alias_graph_to_ascii_dot): New. (write_alias_graph_to_ascii_ecc): Ditto. (partition_drs_to_sets): Add testing of optimality of current method which assigns alias numbers according to DFS Comopnent number. used as heuristic for the upcoming ECC algorithm. (build_scop_drs): Write to file also with the ecc and dot format. From-SVN: r154577
2009-11-25graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do not replace ↵Sebastian Pop1-31/+9
cross BB scalar dependences ending on PHI nodes. 2009-10-09 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do not replace cross BB scalar dependences ending on PHI nodes. (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes. From-SVN: r154570
2009-11-25graphite-poly.h (lst_find_pbb): New.Sebastian Pop1-1/+0
2009-10-09 Sebastian Pop <sebastian.pop@amd.com> * graphite-poly.h (lst_find_pbb): New. (find_lst_loop): New. From-SVN: r154568
2009-11-25graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi when ↵Sebastian Pop1-1/+5
the loop stride is zero. 2009-10-07 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi when the loop stride is zero. * gcc.dg/graphite/id-16.c: New. From-SVN: r154565
2009-11-25graphite-dependences.c (reduction_dr_1): New.Sebastian Pop1-1/+22
2009-10-06 Sebastian Pop <sebastian.pop@amd.com> * graphite-dependences.c (reduction_dr_1): New. (reduction_dr_p): New. (graphite_legal_transform_dr): Call reduction_dr_p. (reduction_ddr): Renamed reduction_ddr_p. * graphite-poly.h (same_pdr_p): New. (number_of_write_pdrs): New. * graphite-sese-to-poly.c (nb_data_writes_in_bb): New. (split_reduction_stmt): Do not split reduction statements when there are no writes to memory. (translate_scalar_reduction_to_array_for_stmt): Insert the memory reduction statement just after the scalar reduction statement. * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c. Un-XFAIL-ed. * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed. * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed. From-SVN: r154564
2009-11-25graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and ↵Sebastian Pop1-0/+1
SCOP_TRANSFORMED_SCHEDULE. 2009-10-06 Sebastian Pop <sebastian.pop@amd.com> * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and SCOP_TRANSFORMED_SCHEDULE. (loop_to_lst): New. (scop_to_lst): New. (print_lst): New. (debug_lst): New. * graphite-poly.h (lst_p): New. (struct lst): New. (LST_LOOP_P): New. (LST_LOOP_FATHER): New. (LST_PBB): New. (LST_SEQ): New. (scop_to_lst): Declared. (print_lst): Declared. (debug_lst): Declared. (new_lst_loop): New. (new_lst_stmt): New. (copy_lst): New. (lst_depth): New. (lst_dewey_number): New. (struct scop): Add original_schedule and transformed_schedule fields. (SCOP_ORIGINAL_SCHEDULE): New. (SCOP_TRANSFORMED_SCHEDULE): New. * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst. From-SVN: r154562
2009-11-25graphite-dependences.c (reduction_ddr): New.Sebastian Pop1-13/+396
2009-10-05 Sebastian Pop <sebastian.pop@amd.com> * graphite-dependences.c (reduction_ddr): New. (graphite_legal_transform_bb): Call reduction_ddr. * graphite-poly.c (new_poly_bb): Pass a new bool parameter. Initialize PBB_IS_REDUCTION. * graphite-poly.h (struct poly_bb): New bool field is_reduction. (PBB_IS_REDUCTION): New. (new_poly_bb): Update declaration. * graphite-scop-detection.h (build_scop_bbs): Removed. (nb_reductions_in_loop): Removed. * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap parameter for reductions. (try_generate_gimple_bb): Update call to new_poly_bb. (build_scop_bbs_1): Same. (build_scop_bbs): Same. (gsi_for_phi_node): New. (scalar_close_phi_node_p): Remove gcc_assert. (split_reduction_stmt): New. (is_reduction_operation_p): New. (phi_contains_arg): New. (follow_ssa_with_commutative_ops): New. (detect_commutative_reduction_arg): New. (detect_commutative_reduction_assign): New. (follow_inital_value_to_phi): New. (edge_initial_value_for_loop_phi): New. (initial_value_for_loop_phi): New. (detect_commutative_reduction): New. (translate_scalar_reduction_to_array_for_stmt): New. (insert_copyout): New. (insert_copyin): New. (translate_scalar_reduction_to_array): New. (rewrite_commutative_reductions_out_of_ssa_close_phi): New. (rewrite_commutative_reductions_out_of_ssa_loop): New. (rewrite_commutative_reductions_out_of_ssa): New. (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa. * sese.h (split_region_for_bb): New. * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math. * gcc.dg/graphite/interchange-1.c: Fix format. * gcc.dg/graphite/interchange-10.c: New. From-SVN: r154561
2009-11-25graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove buggy assert.Sebastian Pop1-1/+0
2009-10-05 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove buggy assert. From-SVN: r154560
2009-11-25graphite-sese-to-poly.c (scev_analyzable_p): New.Sebastian Pop1-2/+112
2009-10-05 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (scev_analyzable_p): New. (rewrite_cross_bb_scalar_dependence): New. (rewrite_cross_bb_scalar_deps): New. (rewrite_reductions_out_of_ssa): Use bb_in_sese_p. Call rewrite_cross_bb_scalar_deps. From-SVN: r154559
2009-11-25graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.Sebastian Pop1-32/+14
2009-10-05 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed. (insert_out_of_ssa_copy): Directly use gsi_after_labels and gsi_for_stmt. From-SVN: r154558