Commit Graph

90 Commits

Author SHA1 Message Date
Sebastian Pop 4ee23fa874 Call scev_analyzable_p only on is_gimple_reg.
2010-07-26  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c
	(rewrite_commutative_reductions_out_of_ssa_loop): Call
	scev_analyzable_p only on is_gimple_reg

	* gcc.dg/graphite/id-25.c: New.

From-SVN: r163158
2010-08-11 20:29:51 +00:00
Sebastian Pop 1c2a7491be Propagate constant values or parametric expressions outside the scop region.
2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (propagate_expr_outside_region): New.
	(rewrite_close_phi_out_of_ssa): Propagate constant values or
	parametric expressions outside the scop region.
	(rewrite_cross_bb_scalar_deps): Same.
	* sese.c (rename_uses): Use NULL_TREE instead of NULL for trees.

	* gcc.dg/graphite/run-id-5.c: New.
	* gcc.dg/graphite/run-id-6.c: New.
	* gfortran.dg/graphite/id-21.f: New.

From-SVN: r163157
2010-08-11 20:29:43 +00:00
Sebastian Pop 320532a817 Use SSA_NAME_DEF_STMT only on SSA_NAMEs.
2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Use
	SSA_NAME_DEF_STMT only on SSA_NAMEs.

	* gcc.dg/graphite/id-24.c: New.

From-SVN: r163156
2010-08-11 20:29:35 +00:00
Sebastian Pop a7d00e71ed Do not translate out-of-SSA close phi nodes that can be analyzed with scev.
2010-07-20  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add an
	extra parameter for the region.  Call scev_analyzable_p.
	(rewrite_reductions_out_of_ssa): Update call to
	rewrite_close_phi_out_of_ssa.
	(rewrite_cross_bb_phi_deps): Same.
	(rewrite_commutative_reductions_out_of_ssa_loop): Add an extra
	parameter for the region.  Call scev_analyzable_p.
	(rewrite_commutative_reductions_out_of_ssa): Update call to
	rewrite_commutative_reductions_out_of_ssa_loop.

From-SVN: r163151
2010-08-11 20:28:54 +00:00
Sebastian Pop 87b28340fd Do not rewrite out of SSA scalar phi nodes that can be scev_analyzable_p.
2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
	SSA scalar phi nodes that can be scev_analyzable_p.

	* gfortran.dg/graphite/id-20.f: Adjust testcase.

From-SVN: r163148
2010-08-11 20:28:31 +00:00
Sebastian Pop 3dd2dd5736 Correctly handle SSA_NAME_IS_DEFAULT_DEF in rewrite_close_phi_out_of_ssa.
2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
	handle SSA_NAME_IS_DEFAULT_DEF.

From-SVN: r163147
2010-08-11 20:28:23 +00:00
Sebastian Pop 8af6d9cdfe Special case non close-phi nodes with one argument in rewrite_close_phi_out_of_ssa.
2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
	case non close-phi nodes with one argument.

From-SVN: r163145
2010-08-11 20:28:07 +00:00
Sebastian Pop a0d1afb3af Remove uses of loop->single_iv.
2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>

	* cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
	* cfgloop.h (struct loop): Remove single_iv field.
	* graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
	(scop_canonicalize_loops): Removed.
	(scop_ivs_can_be_represented): Do not use loop->single_iv.  Iterate
	over all the loop phi nodes in loop->header.
	(build_poly_scop): Remove use of scop_canonicalize_loops.

From-SVN: r163142
2010-08-11 20:27:43 +00:00
Sebastian Pop dba9acfad3 Also handle GIMPLE_CALLs in rewrite_cross_bb_scalar_deps.
2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
	handle GIMPLE_CALL.

From-SVN: r163141
2010-08-11 20:27:35 +00:00
Sebastian Pop 2e286fd2f9 Remove expand_scalar_variables_ hack.
2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
	(debug_clast_name_indexes_1): Removed.
	(debug_clast_name_indexes): Removed.
	(pbb_to_depth_to_oldiv): Removed.
	(build_iv_mapping): Replace the use of rename_map with iv_map.
	(translate_clast_user): Remove uses of rename_map.  Allocate and
	free iv_map.
	(translate_clast_for_loop): Remove uses of rename_map.
	(translate_clast_for): Same.
	(translate_clast_guard): Same.
	(translate_clast): Same.
	(gloog): Same.
	* graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
	* graphite-sese-to-poly.c (scev_analyzable_p): Moved...
	* sese.c (set_rename): Now static.
	(rename_variables_in_stmt): Removed.
	(rename_uses): New.
	(is_parameter): Removed.
	(is_iv): Removed.
	(expand_scalar_variables_call): Removed.
	(expand_scalar_variables_ssa_name): Removed.
	(expand_scalar_variables_expr): Removed.
	(expand_scalar_variables_stmt): Removed.
	(expand_scalar_variables): Removed.
	(rename_variables): Removed.
	(remove_condition): Removed.
	(get_true_edge_from_guard_bb): Removed.
	(get_false_edge_from_guard_bb): Removed.
	(struct igp): Removed.
	(default_before_guard): Removed.
	(convert_for_phi_arg): Removed.
	(add_guard_exit_phis): Removed.
	(insert_guard_phis): Removed.
	(graphite_copy_stmts_from_block): Now also uses iv_map and a
	region.  Do not copy conditions.  Do not copy induction variables.
	Call rename_uses.
	(copy_bb_and_scalar_dependences): Allocate a local rename_map for
	the translated statement.  Use the iv_map for the induction
	variable renaming.
	* sese.h (copy_bb_and_scalar_dependences): Update declaration.
	(set_rename): Removed declaration.
	(scev_analyzable_p): ...here.
	* tree-chrec.c (chrec_apply_map): New.
	* tree-chrec.h (chrec_apply_map): Declared.

From-SVN: r163139
2010-08-11 20:27:19 +00:00
Andreas Simbuerger a9c2ba8f58 Partially removing cloog.h and graphite-clast-to-gimple.h where possible. Removing unused function check_poly_representation.
2010-07-05  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>

	* graphite-cloog-util.h: Added cloog.h.
	* graphite-blocking.c: Removed cloog.h.
	* graphite-dependences.c: Same.
	* graphite-interchange.c: Same.
	* graphite-poly.c: Same.
	* graphite-ppl.c: Same.
	* graphite-scop-detection.c: Same.
	* graphite-sese-to-poly.c:
	Removed cloog.h.
	Removed graphite-clast-to-gimple.h.
	(check_poly_representation): Removed (unused).
	* graphite-sese-to-poly.h
	(check_poly_representation): Removed (unused).

From-SVN: r163135
2010-08-11 20:26:46 +00:00
Sebastian Pop d3e7b889e5 Fix 416.gamess miscompile: special case the rewrite of degenerate phi nodes.
2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
	(rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.

From-SVN: r163131
2010-08-11 20:26:15 +00:00
Sebastian Pop aedede6630 Fix 435.gromacs miscompile: call rewrite_close_phi_out_of_ssa from rewrite_cross_bb_phi_deps.
2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
	rewrite_close_phi_out_of_ssa.

	* gcc.dg/graphite/id-22.c: New.

From-SVN: r163130
2010-08-11 20:26:07 +00:00
Sebastian Pop f2c51113b7 Remove dead code.
2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.

From-SVN: r163129
2010-08-11 20:25:57 +00:00
Sebastian Pop 9773d730e9 Run rewrite_cross_bb_phi_deps before rewrite_cross_bb_scalar_deps.
2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
	(rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
	(rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
	before rewrite_cross_bb_scalar_deps.

From-SVN: r163126
2010-08-11 20:25:34 +00:00
Sebastian Pop cc58897078 Early return in rewrite_commutative_reductions_out_of_ssa when flag_associative_math is not set.
2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
	Early return in when flag_associative_math is not set.

From-SVN: r163125
2010-08-11 20:25:27 +00:00
Sebastian Pop 4aa9a16727 Always insert out of SSA copies on edges except for loop->latch.
2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
	of SSA copies on edges except for loop->latch.

From-SVN: r163123
2010-08-11 20:25:11 +00:00
Sebastian Pop ee646fc62b Split rewrite_cross_bb_scalar_deps_out_of_ssa out from rewrite_reductions_out_of_ssa.
2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
	Split out of rewrite_reductions_out_of_ssa.
	* graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
	Declared.
	* graphite.c (graphite_transform_loops): Call it.

From-SVN: r163122
2010-08-11 20:25:02 +00:00
Sebastian Pop d1ba0721a1 Also rewrite out of SSA scalar dependences going outside the SCoP region.
2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-clast-to-gimple.c (gloog): Remove call to
	sese_adjust_liveout_phis.
	* graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
	SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
	(rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
	rewrite_phi_out_of_ssa.
	* sese.c (get_vdef_before_sese): Removed.
	(sese_adjust_vphi): Removed.
	(sese_adjust_liveout_phis): Removed.
	* sese.h (sese_adjust_liveout_phis): Removed.

From-SVN: r163118
2010-08-11 20:24:30 +00:00
Sebastian Pop 5fed5769e4 Remove insert_copyout and insert_copyin.
2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
	argument for the place after which to insert the out of SSA copy.
	(rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
	(rewrite_phi_out_of_ssa): Same.
	(rewrite_cross_bb_scalar_deps): Same.
	(insert_copyout): Removed.
	(insert_copyin): Removed.
	(translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
	insert_out_of_ssa_copy_on_edge instead of insert_copyout and
	insert_copyin.

From-SVN: r163117
2010-08-11 20:24:23 +00:00
Sebastian Pop 3a7086cc51 Detect commutative reductions in all the scops before rewriting out of SSA all the other scalar dependences.
2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
	(rewrite_reductions_out_of_ssa): Same.
	(rewrite_commutative_reductions_out_of_ssa): Same.
	(build_poly_scop): Do not call these functions.
	* graphite-sese-to-poly.h (build_poly_scop): Declared.
	(rewrite_reductions_out_of_ssa): Declared.
	(rewrite_commutative_reductions_out_of_ssa): Declared.
	* graphite.c (graphite_transform_loops): Call on every scop
	rewrite_commutative_reductions_out_of_ssa before calling
	rewrite_reductions_out_of_ssa and build_scop_bbs.

From-SVN: r163116
2010-08-11 20:24:16 +00:00
Sebastian Pop 159e461678 Fix invariant phi node removal.
2010-05-07  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
	phi_arg_in_outermost_loop.
	(remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
	(remove_invariant_phi): Same.

From-SVN: r163105
2010-08-11 20:22:57 +00:00
Sebastian Pop 6e44d26e24 re PR bootstrap/44726 (Yet another broken bootstrap)
2010-06-30  Sebastian Pop  <sebastian.pop@amd.com>

	PR bootstrrap/44726
	* graphite-sese-to-poly.c (build_poly_dr): Avoid uninitialized
	use.
	(build_alias_set_optimal_p): Likewise.
	(build_base_obj_set_for_drs): Likewise.

From-SVN: r161631
2010-06-30 18:38:37 +00:00
Sebastian Pop c12e2a5fcb Do not gather loop exit conditions on the basic blocks outside the loop.
2010-06-09  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (single_pred_cond): Renamed
	single_pred_cond_non_loop_exit.  Return NULL for loop exit edges.
	(build_sese_conditions_before): Renamed call to single_pred_cond.
	(build_sese_conditions_after): Same.

From-SVN: r160509
2010-06-09 22:09:35 +00:00
Sebastian Pop 072edf0751 Fix comments and indentation.
2010-06-09  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-poly.h: Fix comments and indentation.
	* graphite-sese-to-poly.c: Same.
	(build_sese_conditions_before): Compute stmt and gbb only when needed.
	* tree-chrec.c: Fix comments and indentation.
	(tree-ssa-loop-niter.c): Same.

From-SVN: r160508
2010-06-09 22:09:28 +00:00
Andreas Simbuerger e262fdda84 Replace Value with mpz_t
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-06 21:53:35 +00:00
Andreas Simbuerger a0bb35c774 Resolve CLooG's value_* macros to their respective mpz_* counterparts.
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-05-06 21:53:29 +00:00
Sebastian Pop bd32f344ed Compute min and max bounds for IVs and infer types.
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-06 21:01:16 +00:00
Sebastian Pop 79d03cf81b Add extra checks for places assuming one argument loop close SSA form.
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-06 21:00:12 +00:00
Sebastian Pop a3b9e73ca3 Avoid calling verify_ssa twice in verify_loop_closed_ssa.
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-06 19:20:47 +00:00
Matthias Klose 7e0ec110d5 graphite-sese-to-poly.c (translate_scalar_reduction_to_array): Initialize 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-05 11:40:29 +00:00
Steven Bosscher c75c517d53 Make-lang.in, [...]: Update copyright years.
* 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-04-02 19:54:46 +00:00
Sebastian Pop c80a540338 canonicalize_loop_ivs should add the IV bump in loop->header.
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-31 18:37:13 +00:00
Aldy Hernandez c36fed0ca4 graphite-sese-to-poly.c (split_reduction_stmt): Skip debug statements before splitting block.
* graphite-sese-to-poly.c (split_reduction_stmt): Skip debug
        statements before splitting block.

From-SVN: r157494
2010-03-16 20:04:04 +00:00
Aldy Hernandez 7dee65d88a graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Skip debug statements.
* graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Skip
        debug statements.

From-SVN: r157465
2010-03-15 19:18:49 +00:00
Sebastian Pop 6492b6940b Fix PR43354: Correctly handle default definitions.
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-13 17:35:45 +00:00
Sebastian Pop 248081bc93 Use ssizetype when long_long_integer_type_node is NULL.
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-13 17:35:29 +00:00
Sebastian Pop a5a59b11a9 Cleanup: remove FIXMEs, add new function.
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-13 17:35:15 +00:00
Sebastian Pop e84aaa3320 Make build_poly_scop not return a bool.
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-13 17:34:44 +00:00
Sebastian Pop 4e7dd37645 Limit the number of parameters per SCoP.
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-13 17:34:38 +00:00
Sebastian Pop 697f511dd4 Use {lower,upper}_bound_in_type.
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-08 17:50:09 +00:00
Sebastian Pop 456cc718b4 Use sizetype instead of unsigned_type_node.
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-08 17:50:03 +00:00
Sebastian Pop 3640d64c0f Fix PR43065: Insert bounds on pointer type parameters.
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-08 17:49:57 +00:00
Tobias Grosser 68d3ff9044 Fix type problems in loop ivs.
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-08 17:49:36 +00:00
Sebastian Pop 733ff09d83 Add constraints on the type of parameters to the scop context.
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-03-08 17:48:42 +00:00
Sebastian Pop a4681954cf Fix PR42914 and PR42530.
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-11 19:42:45 +00:00
Sebastian Pop a1954f72c6 re PR tree-optimization/42771 ([graphite] ICE: in graphite_loop_normal_form, 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
2010-02-11 19:42:38 +00:00
Robert Millan 8404785839 re PR other/42537 ([PATCH] misc spelling fixes)
/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-30 10:53:31 +00:00
Sebastian Pop a84a556d97 re PR middle-end/42180 (compiling induct.f90 with -ffast-math -O2 -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-23 07:51:05 +00:00
Sebastian Pop b147df0bcf re PR middle-end/42180 (compiling induct.f90 with -ffast-math -O2 -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-23 07:50:53 +00:00