aboutsummaryrefslogtreecommitdiff
path: root/gcc/graphite-isl-ast-to-gimple.c
AgeCommit message (Collapse)AuthorFilesLines
2017-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r243994
2016-11-11re PR tree-optimization/71575 ([graphite] internal compiler error: in ↵Richard Biener1-3/+0
copy_cond_phi_nodes, at graphite-isl-ast-to-gimple.c:2500) 2016-11-11 Richard Biener <rguenther@suse.de> PR tree-optimization/71575 * graphite-isl-ast-to-gimple.c (copy_cond_phi_nodes): Remove bogus assert. * gcc.dg/graphite/pr71575-1.c: New testcase. * gcc.dg/graphite/pr71575-2.c: Likewise. From-SVN: r242069
2016-08-12re PR c/7652 (-Wswitch-break : Warn if a switch case falls through)Marek Polacek1-1/+1
PR c/7652 gcc/ * alias.c (find_base_value): Adjust fall through comment. * cfgexpand.c (expand_debug_expr): Likewise. * combine.c (find_split_point): Likewise. (expand_compound_operation): Likewise. Add FALLTHRU. (make_compound_operation): Adjust fall through comment. (canon_reg_for_combine): Add FALLTHRU. (force_to_mode): Adjust fall through comment. (simplify_shift_const_1): Likewise. (simplify_comparison): Likewise. * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Add FALLTHRU. * config/aarch64/predicates.md: Likewise. * config/i386/i386.c (function_arg_advance_32): Likewise. (ix86_gimplify_va_arg): Likewise. (print_reg): Likewise. (ix86_print_operand): Likewise. (ix86_build_const_vector): Likewise. (ix86_expand_branch): Likewise. (ix86_sched_init_global): Adjust fall through comment. (ix86_expand_args_builtin): Add FALLTHRU. (ix86_expand_builtin): Likewise. (ix86_expand_vector_init_one_var): Likewise. * config/rs6000/rs6000.c (rs6000_emit_vector_compare_inner): Likewise. (rs6000_adjust_cost): Likewise. (insn_must_be_first_in_group): Likewise. * config/rs6000/rs6000.md: Likewise. Adjust fall through comment. * dbxout.c (dbxout_symbol): Adjust fall through comment. * df-scan.c (df_uses_record): Likewise. * dojump.c (do_jump): Add FALLTHRU. * dwarf2out.c (mem_loc_descriptor): Likewise. Adjust fall through comment. (resolve_args_picking_1): Adjust fall through comment. (loc_list_from_tree_1): Likewise. * expmed.c (make_tree): Likewise. * expr.c (expand_expr_real_2): Add FALLTHRU. (expand_expr_real_1): Likewise. Adjust fall through comment. * fold-const.c (const_binop): Adjust fall through comment. (fold_truth_not_expr): Likewise. (fold_cond_expr_with_comparison): Add FALLTHRU. (fold_binary_loc): Likewise. (contains_label_1): Adjust fall through comment. (multiple_of_p): Likewise. * gcov-tool.c (process_args): Add FALLTHRU. * genattrtab.c (check_attr_test): Likewise. (write_test_expr): Likewise. * genconfig.c (walk_insn_part): Likewise. * genpreds.c (validate_exp): Adjust fall through comment. (needs_variable): Likewise. * gensupport.c (get_alternatives_number): Add FALLTHRU. (subst_dup): Likewise. * gimple-pretty-print.c (dump_gimple_assign): Likewise. * gimplify.c (gimplify_addr_expr): Adjust fall through comment. (gimplify_scan_omp_clauses): Add FALLTHRU. (goa_stabilize_expr): Likewise. * graphite-isl-ast-to-gimple.c (substitute_ssa_name): Adjust fall through comment. * hsa-gen.c (get_address_from_value): Likewise. * ipa-icf.c (sem_function::hash_stmt): Likewise. * ira.c (ira_setup_alts): Add FALLTHRU. * lra-eliminations.c (lra_eliminate_regs_1): Adjust fall through comment. * lto-streamer-out.c (lto_output_tree_ref): Add FALLTHRU. * opts.c (common_handle_option): Likewise. * read-rtl.c (read_rtx_code): Likewise. * real.c (round_for_format): Likewise. * recog.c (asm_operand_ok): Likewise. * reginfo.c (reg_scan_mark_refs): Adjust fall through comment. * reload1.c (set_label_offsets): Likewise. (eliminate_regs_1): Likewise. (reload_reg_reaches_end_p): Likewise. * rtlanal.c (commutative_operand_precedence): Add FALLTHRU. (rtx_cost): Likewise. * sched-rgn.c (is_exception_free): Likewise. * simplify-rtx.c (simplify_rtx): Adjust fall through comment. * stor-layout.c (int_mode_for_mode): Likewise. * toplev.c (print_to_asm_out_file): Likewise. (print_to_stderr): Likewise. * tree-cfg.c (gimple_verify_flow_info): Likewise. * tree-chrec.c (chrec_fold_plus_1): Add FALLTHRU. (chrec_fold_multiply): Likewise. (evolution_function_is_invariant_rec_p): Likewise. (for_each_scev_op): Likewise. * tree-data-ref.c (siv_subscript_p): Likewise. (get_references_in_stmt): Likewise. * tree.c (find_placeholder_in_expr): Adjust fall through comment. (substitute_in_expr): Likewise. (type_cache_hasher::equal): Likewise. (walk_type_fields): Likewise. * var-tracking.c (adjust_mems): Add FALLTHRU. (set_dv_changed): Adjust fall through comment. * varasm.c (default_function_section): Add FALLTHRU. gcc/c-family/ * c-common.c (scalar_to_vector): Adjust fall through comment. * c-opts.c (c_common_handle_option): Likewise. * c-pragma.c (handle_pragma_pack): Add FALLTHRU. * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust fall through comment. * cilk.c (extract_free_variables): Add FALLTHRU. gcc/c/ * c-parser.c (c_parser_external_declaration): Add FALLTHRU. (c_parser_postfix_expression): Likewise. * c-typeck.c (build_unary_op): Adjust fall through comment. (c_mark_addressable): Likewise. gcc/cp/ * call.c (add_builtin_candidate): Add FALLTHRU. (build_integral_nontype_arg_conv): Adjust fall through comment. (build_new_op_1): Add FALLTHRU. (convert_like_real): Adjust fall through comment. * class.c (fixed_type_or_null): Likewise. * constexpr.c (cxx_eval_constant_expression): Likewise. (potential_constant_expression_1): Likewise. Add FALLTHRU. * cp-gimplify.c (cp_gimplify_expr): Adjust fall through comment. (cp_fold): Add FALLTHRU. * cvt.c (build_expr_type_conversion): Adjust fall through comment. * cxx-pretty-print.c (pp_cxx_unqualified_id): Add FALLTHRU. (pp_cxx_qualified_id): Likewise. (cxx_pretty_printer::constant): Adjust fall through comment. (cxx_pretty_printer::primary_expression): Add FALLTHRU. (pp_cxx_pm_expression): Adjust fall through comment. (cxx_pretty_printer::expression): Add FALLTHRU. (cxx_pretty_printer::declaration_specifiers): Reformat code. (pp_cxx_type_specifier_seq): Adjust fall through comment. (pp_cxx_ptr_operator): Likewise. Add FALLTHRU. * error.c (dump_type): Adjust fall through comment. (dump_decl): Likewise. * mangle.c (write_type): Likewise. * method.c (synthesized_method_walk): Add FALLTHRU. * name-lookup.c (arg_assoc_type): Likewise. * parser.c (cp_lexer_print_token): Adjust fall through comment. (cp_parser_primary_expression): Add FALLTHRU. (cp_parser_operator): Likewise. * pt.c (find_parameter_packs_r): Likewise. (tsubst_aggr_type): Adjust fall through comment. * semantics.c (finish_omp_clauses): Add FALLTHRU. * tree.c (lvalue_kind): Likewise. gcc/fortran/ * decl.c (match_attr_spec): Add FALLTHRU. * primary.c (match_arg_list_function): Likewise. * resolve.c (resolve_operator): Adjust fall through comment. (fixup_charlen): Add FALLTHRU. (resolve_allocate_expr): Adjust fall through comment. * trans-array.c (gfc_conv_ss_startstride): Add FALLTHRU. * trans-intrinsic.c (gfc_conv_intrinsic_len): Adjust fall through comment. gcc/java/ * expr.c (java_truthvalue_conversion): Adjust fall through comment. * jcf-io.c (verify_constant_pool): Likewise. * typeck.c (promote_type): Likewise. gcc/objc/ * objc-encoding.c (encode_type): Add FALLTHRU. libcpp/ * lex.c (search_line_fast): Add FALLTHRU. (_cpp_lex_direct): Likewise. (cpp_token_val_index): Adjust fall through comment. * macro.c (parse_params): Add FALLTHRU. * pch.c (count_defs): Adjust fall through comment. (write_defs): Likewise. libiberty/ * cp-demangle.c (d_print_mod): Add FALLTHRU. From-SVN: r239410
2016-07-20Properly handly PHI stmts in later_of_the_two (PRMartin Liska1-0/+12
PR middle-end/71898 * graphite-isl-ast-to-gimple.c (later_of_the_two): Properly handly PHI stmts. * gfortran.dg/graphite/pr71898.f90: New test. From-SVN: r238513
2016-05-31Handle 3-arg phi in copy_bb_and_scalar_dependencesTom de Vries1-6/+5
2016-05-31 Tom de Vries <tom@codesourcery.com> PR tree-optimization/69068 * graphite-isl-ast-to-gimple.c (copy_bb_and_scalar_dependences): Handle phis with more than two args. * gcc.dg/graphite/pr69068.c: New test. From-SVN: r236907
2016-05-30Remove assert in get_def_bb_for_constTom de Vries1-1/+0
2016-05-30 Tom de Vries <tom@codesourcery.com> PR tree-optimization/69067 * graphite-isl-ast-to-gimple.c (get_def_bb_for_const): Remove assert. * gcc.dg/graphite/pr69067.c: New test. From-SVN: r236868
2016-04-22[PATCH 2/2] (header usage fix) include c++ headers in system.hSzabolcs Nagy1-1/+1
2016-04-22 Szabolcs Nagy <szabolcs.nagy@arm.com> * system.h (list, map, set, vector): Include conditionally. * auto-profile.c (INCLUDE_MAP, INCLUDE_SET): Define. * graphite-isl-ast-to-gimple.c (INCLUDE_MAP): Define. * ipa-icf.c (INCLUDE_LIST): Define. * config/aarch64/cortex-a57-fma-steering.c (INCLUDE_LIST): Define. * config/sh/sh.c (INCLUDE_VECTOR): Define. * config/sh/sh_treg_combine.cc (INCLUDE_ALGORITHM): Define. (INCLUDE_LIST, INCLUDE_VECTOR): Define. * cp/logic.cc (INCLUDE_LIST): Define. * fortran/trans-common.c (INCLUDE_MAP): Define. From-SVN: r235362
2016-04-12Fix typo in copy_cond_phi_argsTom de Vries1-1/+1
2016-04-12 Tom de Vries <tom@codesourcery.com> PR tree-optimization/68756 * graphite-isl-ast-to-gimple.c (copy_cond_phi_args): Use new_expr instead of new_name. * gcc.dg/graphite/pr68756.c: New test. From-SVN: r234896
2016-03-14Unshare create_empty_if_region_on_edge argumentTom de Vries1-1/+2
2016-03-14 Tom de Vries <tom@codesourcery.com> PR tree-optimization/70045 * graphite-isl-ast-to-gimple.c (graphite_create_new_loop_guard): Unshare create_empty_if_region_on_edge argument. * gcc.dg/graphite/pr70045.c: New test. From-SVN: r234177
2016-03-02Handle addr_expr and component_ref in graphite-ast-to-astTom de Vries1-1/+3
2016-03-02 Tom de Vries <tom@codesourcery.com> PR tree-optimization/68659 * graphite-isl-ast-to-gimple.c (collect_all_ssa_names): Handle new_expr == NULL_TREE. (get_new_name): Handle ADDR_EXPR. From-SVN: r233909
2016-01-29PR69545: revert patchSebastian Pop1-5/+16
Revert 'assert instead of silently failing code gen' that produces an ICE with isl-0.14. From-SVN: r232966
2016-01-28remove out of sync commentsSebastian Pop1-354/+83
* 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. From-SVN: r232934
2016-01-28use codegen_error_pSebastian Pop1-24/+25
* 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. (graphite_create_new_loop): Same. (graphite_create_new_loop_guard): Same. (build_iv_mapping): Same. (graphite_create_new_guard): Same. (translate_isl_ast_to_gimple::copy_loop_phi_nodes): Same. (translate_isl_ast_to_gimple::translate_pending_phi_nodes): Same. From-SVN: r232933
2016-01-28assert instead of silently failing code genSebastian Pop1-20/+6
* graphite-isl-ast-to-gimple.c (get_rename_from_scev): Assert instead of setting codegen_error to fail codegen. From-SVN: r232932
2016-01-26handle isl_ast_op_selectAbderrazek Zaafrani1-10/+8
2016-01-26 Abderrazek Zaafrani <a.zaafrani@samsung.com> Sebastian Pop <s.pop@samsung.com> * 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. Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r232851
2016-01-26new scop schedule for isl-0.15Aditya Kumar1-86/+117
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. (debug_isl_schedule): New. * graphite-dependences.c (scop_get_reads): Do not call isl_union_map_add_map that is undocumented isl functionality. (scop_get_must_writes): Same. (scop_get_may_writes): Same. (scop_get_original_schedule): Remove. (scop_get_dependences): Do not call isl_union_map_compute_flow that is deprecated in isl 0.15. Instead, use isl_union_access_* interface. (compute_deps): Remove. * graphite-isl-ast-to-gimple.c (print_schedule_ast): New. (debug_schedule_ast): New. (translate_isl_ast_to_gimple::scop_to_isl_ast): Call set_separate_option. (graphite_regenerate_ast_isl): Add dump. (translate_isl_ast_to_gimple::scop_to_isl_ast): Generate code from scop->transformed_schedule. (graphite_regenerate_ast_isl): Add more dump. * graphite-optimize-isl.c (optimize_isl): Set scop->transformed_schedule. Check whether schedules are equal. (apply_poly_transforms): Move here. * graphite-poly.c (apply_poly_transforms): ... from here. (free_poly_bb): Static. (free_scop): Static. (pbb_number_of_iterations_at_time): Remove. (print_isl_ast): New. (debug_isl_ast): New. (debug_scop_pbb): New. * graphite-scop-detection.c (print_edge): Move. (print_sese): Move. * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Remove. (build_scop_scattering): Remove. (create_pw_aff_from_tree): Assert instead of bailing out. (add_condition_to_pbb): Remove unused code, do not fail. (add_conditions_to_domain): Same. (add_conditions_to_constraints): Remove. (build_scop_context): New. (add_iter_domain_dimension): New. (build_iteration_domains): Initialize pbb->iterators. Call add_conditions_to_domain. (nested_in): New. (loop_at): New. (index_outermost_in_loop): New. (index_pbb_in_loop): New. (outermost_pbb_in): New. (add_in_sequence): New. (add_outer_projection): New. (outer_projection_mupa): New. (add_loop_schedule): New. (build_schedule_pbb): New. (build_schedule_loop): New. (embed_in_surrounding_loops): New. (build_schedule_loop_nest): New. (build_original_schedule): New. (build_poly_scop): Call build_original_schedule. * graphite.h: Declare print_isl_schedule and debug_isl_schedule. (free_poly_dr): Remove. (struct poly_bb): Add iterators. Remove schedule, transformed, saved. (free_poly_bb): Remove. (debug_loop_vec): Remove. (print_isl_ast): Declare. (debug_isl_ast): Declare. (scop_do_interchange): Remove. (scop_do_strip_mine): Remove. (scop_do_block): Remove. (flatten_all_loops): Remove. (optimize_isl): Remove. (pbb_number_of_iterations_at_time): Remove. (debug_scop_pbb): Declare. (print_schedule_ast): Declare. (debug_schedule_ast): Declare. (struct scop): Remove schedule. Add original_schedule, transformed_schedule. (free_gimple_poly_bb): Remove. (print_generated_program): Remove. (debug_generated_program): Remove. (unify_scattering_dimensions): Remove. * sese.c (print_edge): ... here. (print_sese): ... here. (debug_edge): ... here. (debug_sese): ... here. * sese.h (print_edge): Declare. (print_sese): Declare. (dump_edge): Declare. (dump_sese): Declare. Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r232812
2016-01-21fix codegen error exposed by compute isl flow patchAditya Kumar1-18/+30
we used to fail using an iv from a different loop. * graphite-isl-ast-to-gimple.c (enum phi_node_kind): New. (class translate_isl_ast_to_gimple): Use phi_node_kind instead of bool. (is_valid_rename): Same. (translate_isl_ast_to_gimple::get_rename): Same. (translate_isl_ast_to_gimple::rename_all_uses): Same. (translate_isl_ast_to_gimple::rename_uses): Same. (get_new_name): Check for close_phi nodes. (copy_loop_phi_args): Use phi_node_kind. (translate_isl_ast_to_gimple::copy_loop_close_phi_args): Same. (translate_isl_ast_to_gimple::copy_cond_phi_args): Same. gcc/testsuite * gfortran.dg/graphite/interchange-3.f90: Adjust pattern. Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r232660
2016-01-21fix pr68692: reinstantiate the copy of internal parametersAditya Kumar1-1/+106
Adding a testcase and reverting this patch: [PATCH] remove parameter_rename_map 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_parameters): Remove. (graphite_regenerate_ast_isl): Remove call to copy_internal_parameters. * sese.c (new_sese_info): Do not initialize parameter_rename_map. (free_sese_info): Do not free parameter_rename_map. (set_rename): Do not use parameter_rename_map. (rename_uses): Update call to set_rename. (graphite_copy_stmts_from_block): Do not use parameter_rename_map. * sese.h (parameter_rename_map_t): Remove. (struct sese_info_t): Remove field parameter_rename_map. Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r232659
2016-01-21fix PR68976: only add loop close phi for names defined in loopAditya Kumar1-2/+2
* graphite-isl-ast-to-gimple.c: Fix comment. * graphite-scop-detection.c (defined_in_loop_p): New. (canonicalize_loop_closed_ssa): Do not add close phi nodes for SSA names defined in loop. gcc/testsuite * gcc.dg/graphite/pr68976.c: New test. Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r232658
2016-01-21add missing ast node for isl 0.15Aditya Kumar1-0/+10
* graphite-isl-ast-to-gimple.c (translate_isl_ast): Also handle isl_ast_node_mark. Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r232652
2016-01-21add more coalescing to simplify constraintsAditya Kumar1-0/+2
* graphite-dependences.c (constrain_domain): Add call to isl_*_coalesce. (add_pdr_constraints): Same. (scop_get_reads): Same. (scop_get_must_writes): Same. (scop_get_may_writes): Same. (scop_get_original_schedule): Same. (extend_schedule): Same. (apply_schedule_on_deps): Same. (carries_deps): Same. (compute_deps): Same. (scop_get_dependences): Same. * graphite-isl-ast-to-gimple.c (translate_isl_ast_to_gimple::generate_isl_schedule): Same. * graphite-optimize-isl.c (get_schedule_for_band): Same. (get_schedule_for_band_list): Same. (get_schedule_map): Same. (apply_schedule_map_to_scop): Same. * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same. (build_loop_iteration_domains): Same. (add_condition_to_pbb): Same. (add_param_constraints): Same. (pdr_add_memory_accesses): Same. (pdr_add_data_dimensions): Same. Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r232650
2016-01-04Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r232055
2015-12-17replace ISL with islSebastian Pop1-24/+23
From-SVN: r231784
2015-12-17move all isl include files to graphite.hSebastian Pop1-12/+0
* graphite-dependences.c: Move all isl include files to... * graphite-isl-ast-to-gimple.c: Same. * graphite-optimize-isl.c: Same. * graphite-poly.c: Same. * graphite-scop-detection.c: Same. * graphite.c: Same. * graphite.h: ... here. From-SVN: r231783
2015-12-16attach schedule tree to the scopAbderrazek Zaafrani1-2/+63
we used to translate the just computed schedule tree into a union_map, and then in the code generation it would be translated back to a schedule tree just before generating AST code. From-SVN: r231725
2015-12-16Remove individial dependence pointers and add a scop::dependence to contain ↵Aditya Kumar1-5/+2
all the dependence. Removed the member variables which are only used in scop_get_dependence. Instead only maintaining the overall dependence. Passes regtest and bootstrap. gcc/ChangeLog: 2015-12-15 hiraditya <hiraditya@msn.com> * graphite-dependences.c (scop_get_dependences): Use local pointers. * graphite-isl-ast-to-gimple.c(translate_isl_ast_to_gimple::scop_to_isl_ast): Use scop->dependence. * graphite-optimize-isl.c (optimize_isl): Same. * graphite-poly.c (new_scop): Remove initialization of removed members. (free_scop): Same. * graphite.h (struct scop): Remove individial dependence pointers and add a scop::dependence to contain all the dependence. From-SVN: r231708
2015-12-16update required isl versionAditya Kumar1-8/+2
we check for a the isl compute timeout function added in isl 0.13. That means GCC could still be configured with isl 0.13, 0.14, and 0.15. * config/isl.m4 (ISL_CHECK_VERSION): Check for isl_ctx_get_max_operations. * configure: Regenerate. gcc/ * config.in: Regenerate. * configure: Regenerate. * configure.ac: Remove checks for functions that exist in isl 0.13 or later. * graphite-isl-ast-to-gimple.c: Remove #ifdefs and code for isl 0.12. * graphite-optimize-isl.c: Same. * graphite-poly.c: Same. * graphite-sese-to-poly.c: Same. * graphite.h: Add comment for isl 0.14. * toplev.c (print_version): Print isl version. Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r231706
2015-12-04check that all the scev applied ops have are dominated by their defsAditya Kumar1-13/+22
2015-12-02 Aditya Kumar <aditya.k7@samsung.com> Sebastian Pop <s.pop@samsung.com> * gcc.dg/graphite/id-29.c: New test. gcc/ChangeLog: 2015-12-02 Aditya Kumar <aditya.k7@samsung.com> Sebastian Pop <s.pop@samsung.com> * graphite-isl-ast-to-gimple.c (translate_isl_ast_node_user): Improve debug. (get_rename_from_scev): Check that all the ops in an expression have their uses dominated by corresponding defs. Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r231310
2015-12-03Guard isl_ast_op_zdiv_r usage with HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCSTom de Vries1-0/+4
2015-12-03 Tom de Vries <tom@codesourcery.com> * graphite-isl-ast-to-gimple.c (binary_op_to_tree) (gcc_expression_from_isl_expr_op): Guard isl_ast_op_zdiv_r usage with HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS. From-SVN: r231223
2015-12-02handle missing isl_ast_exprAditya Kumar1-0/+2
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. * gcc.dg/graphite/id-28.c: New. Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r231212
2015-12-02do not insert code outside the generated regionAditya Kumar1-0/+1
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. Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r231211
2015-12-02fix PR68550: do not handle ISL loop peeled statementsAditya Kumar1-0/+26
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). PR tree-optimization/68550 * graphite-isl-ast-to-gimple.c (copy_loop_phi_nodes): Add dump. (copy_bb_and_scalar_dependences): Do not code generate loop peeled statements. * gfortran.dg/graphite/pr68550-1.f90: New. * gfortran.dg/graphite/pr68550-2.f90: New. Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r231206
2015-11-30check for ISL generated code that leads to division by zeroAditya Kumar1-2/+83
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. PR tree-optimization/68565 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Early return on codegen_error. Fail when rhs of division operations is integer_zerop. (ternary_op_to_tree): Early return on codegen_error. (unary_op_to_tree): Same. (nary_op_to_tree): Same. (gcc_expression_from_isl_expr_op): Same. (gcc_expression_from_isl_expression): Same. (graphite_create_new_loop): On codegen_error continue generating wrong code. (graphite_create_new_loop_guard): Same. (build_iv_mapping): Same. (graphite_create_new_guard): Same. * gfortran.dg/graphite/pr68565.f90: New. Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r231086
2015-11-30always print parameter names as P_{SSA_NAME_VERSION}Aditya Kumar1-2/+2
Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r231085
2015-11-26fix PR68453: recursively add phi nodes to merge pointsAditya Kumar1-88/+213
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. Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r230918
2015-11-24fix PR67984: check for constants in rename mapAditya Kumar1-38/+60
Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r230826
2015-11-24move all declarations to a same .h fileAditya Kumar1-2/+1
Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r230825
2015-11-23fix PR68493: bail out when codegen_error is setAditya Kumar1-0/+2
Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r230772
2015-11-23call update_ssa onceAditya Kumar1-9/+0
Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r230770
2015-11-23Correct graphite*.c ISL header file inclusion order.David Edelsohn1-20/+21
* system.h: Don't poison calloc and strdup if USES_ISL is defined. * graphite-dependences.c: Define USES_ISL. Include ISL header files after GCC header files and before graphite header files. * graphite-dependences.c: Same. * graphite-isl-ast-to-gimple.c: Same. * graphite-optimize-isl.c: Same. * graphite-poly.c: Same. * graphite-scop-detection.c: Same. * graphite-sese-to-poly.c: Same. * graphite.c: Same. From-SVN: r230759
2015-11-19fix PR68341: correctly compute the insertion point for close phi nodesAditya Kumar1-34/+62
Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r230631
2015-11-19fix bootstrap without ISL on old linkersAditya Kumar1-32/+0
With and without this patch passes bootstrap on x86_64-linux with and without ISL. The problem occurs on systems with older linkers that do not remove dead symbols. From-SVN: r230625
2015-11-18Enable condegen in case of cond phis.Aditya Kumar1-62/+106
The codegen of conditional PHIs inside the scop where one predecessor dominates the other was difficult so it wasn't enabled in the previous patch. After a couple of bug-fixes this has been enabled in this patch. Not all the cases could be handled in this case because it becomes difficult to map the basic block back to original code in some cases. Bug-fixes: 1. The vec_find returns -1 when no element was found. This wasn't checked. 2. When the arguments to pending phis could not be resolved in the second pass, the codegen would fail so the new code should be cleaned up. This patch passes regtest and bootstrap on linux-x86-64 with BOOT_CFLAGS='-O2 -fgraphite-identity -floop-nest-optimize' 2015-11-14 hiraditya <hiraditya@msn.com> * graphite-isl-ast-to-gimple.c (copy_loop_phi_args): Change the return type to bool for early exit. (translate_isl_ast_to_gimple::copy_loop_phi_nodes): Early return in case of error. (translate_isl_ast_to_gimple::copy_loop_close_phi_args): Same. (add_phi_arg_for_new_expr): Enable codegen for if-block where one predecessor dominates the other. (translate_isl_ast_to_gimple::copy_cond_phi_args): Fix. When the element is not found it returns -1. (translate_isl_ast_to_gimple::translate_pending_phi_nodes): Bail out early when codegen fails. (graphite_regenerate_ast_isl): Remove codegen region when pending phis could not be generated. From-SVN: r230567
2015-11-18Move codegen related functions to graphite-isl-ast-to-gimple.cAditya Kumar1-75/+1844
No functional changes intended. This patch passes regtest and bootstrap on linux-x86-64 with BOOT_CFLAGS='-O2 -fgraphite-identity -floop-nest-optimize' gcc/ChangeLog: 2015-11-14 hiraditya <hiraditya@msn.com> * graphite-isl-ast-to-gimple.c (struct ast_build_info): Remove semicolon. (class translate_isl_ast_to_gimple): Indentation. (translate_pending_phi_nodes): Comment. (add_parameters_to_ivs_params): Moved from sese.c inside class translate_isl_ast_to_gimple. (get_max_schedule_dimensions): Same. (generate_isl_context): Same. (extend_schedule): Same. (generate_isl_schedule): Same. (set_options): Same. (scop_to_isl_ast): Same. (is_valid_rename): Same. (get_rename): Same. (get_rename_from_scev): Same. (get_def_bb_for_const): Same. (get_new_name): Same. (collect_all_ssa_names): Same. (copy_loop_phi_args): Same. (copy_loop_phi_nodes): Same. (copy_loop_close_phi_args): Same. (copy_loop_close_phi_nodes): Same. (copy_cond_phi_args): Same. (copy_cond_phi_nodes): Same. (graphite_copy_stmts_from_block): Same. (copy_bb_and_scalar_dependences): Same. (add_phi_arg_for_new_expr): Same. (rename_uses): Same. (set_rename): Same. (set_rename_for_each_def): Same. (gsi_insert_earliest): Same. (rename_all_uses): Same. (codegen_error_p): Same. (print_isl_ast_node): Same. (translate_isl_ast_for_loop): Call function codegen_error_p. (translate_isl_ast_to_gimple::translate_isl_ast): Same. (translate_isl_ast_node_user): Make nb_loops const and release iv_map before exit. (get_true_edge_from_guard_bb): Move all free-functions early. (get_false_edge_from_guard_bb): Same. (bb_contains_loop_close_phi_nodes): Same. (bb_contains_loop_phi_nodes): Same. (is_loop_closed_ssa_use): Same. (number_of_phi_nodes): Same. (phi_uses_name): Same. (later_of_the_two): Same. (substitute_ssa_name): (get_edges): Same. (get_loc): Same. (get_loop_init_value): Same. (find_init_value): Same. (find_init_value_close_phi): Same. (ast_build_before_for): Same. (graphite_regenerate_ast_isl): Formatting changes. * graphite-scop-detection.c (build_cross_bb_scalars_use): Same. * sese.c (get_rename): Move to graphite-isl-ast-to-gimple.c (set_rename): Same. (gsi_insert_earliest): Same. (collect_all_ssa_names): Same. (rename_all_uses): Same. (rename_uses): Same. (get_def_bb_for_const): Same. (copy_loop_phi_nodes): Same. (copy_loop_close_phi_args): Same. (copy_loop_close_phi_nodes): Same. (copy_cond_phi_args): Same. (copy_cond_phi_nodes): Same. (set_rename_for_each_def): Same. (graphite_copy_stmts_from_block): Same. (copy_bb_and_scalar_dependences): Same. (if_region_set_false_region): Same. (scev_analyzable_p): Same. * sese.h: Delete extern functions moved to graphite-isl-ast-to-gimple.c From-SVN: r230566
2015-11-12Preserve the original program while using graphite.Aditya Kumar1-34/+117
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 was represented as independent basic block in the polyhedral model. So all the cross-basic-block dependencies were translated out-of-ssa. With this patch those dependencies are also exposed to the ISL, so there is no need to modify the original structure of the program. After this patch we should be able to enable graphite at some default optimization level. Highlights: Remove cross bb scalar to array translation For reductions, add support for more than just INT_CST Early bailout on codegen. Verify loop-closed ssa structure during copy of renames The uses of exprs should come from bb which dominates the bb Collect the init value of close phi in loop-guard Do not follow vuses for close-phi, postpone loop-close phi until the corresponding loop-phi is processed Bail out if no bb found to place cond/loop -phis Move insertion of liveouts at the end of codegen Insert loop-phis in the loop-header. This patch passes regtest and bootstrap with BOOT_CFLAGS='-O2 -fgraphite-identity -floop-nest-optimize' 2015-11-11 Aditya Kumar <aditya.k7@samsung.com> Sebastian Pop <s.pop@samsung.com> * graphite-isl-ast-to-gimple.c (class translate_isl_ast_to_gimple): New member codegen_error (translate_isl_ast_for_loop): Remove call to single_succ_edge and early return. (translate_isl_ast_node_user): Early return in case of error. (translate_isl_ast_to_gimple::translate_isl_ast): Same. (translate_isl_ast_to_gimple::translate_pending_phi_nodes): New. (add_parameters_to_ivs_params): Remove macro. (graphite_regenerate_ast_isl): Add if_region pointer to region. * graphite-poly.c (new_poly_dr): Remove macro. (print_pdr): Same. (new_gimple_poly_bb): Same. (free_gimple_poly_bb): Same. (print_scop_params): Same. * graphite-poly.h (struct poly_dr): Same. (struct poly_bb): Add new_bb. (gbb_from_bb): Remove dead code. (pbb_from_bb): Same. * graphite-scop-detection.c (parameter_index_in_region_1): Same. (parameter_index_in_region): Same. (find_scop_parameters): Same. (build_cross_bb_scalars_def): New. (build_cross_bb_scalars_use): New. (graphite_find_cross_bb_scalar_vars): New (try_generate_gimple_bb): Reads and Writes. (build_alias_set): Move. (gather_bbs::before_dom_children): Gather bbs visited. (build_scops): call build_alias_set. * graphite-sese-to-poly.c (phi_arg_in_outermost_loop): Delete. (remove_simple_copy_phi): Delete. (remove_invariant_phi): Delete. (simple_copy_phi_p): Delete. (reduction_phi_p): Delete. (isl_id_for_dr): Remove unused param. (parameter_index_in_region_1): Remove macro usage. (set_scop_parameter_dim): Same. (add_param_constraints): Same. (add_conditions_to_constraints): Same (build_scop_iteration_domain): Same. (pdr_add_alias_set): Comment. (add_scalar_version_numbers): New. (build_poly_dr): ISL id. (build_scop_drs): Move. (build_poly_sr_1): Same. (insert_stmts): Remove. (build_poly_sr): New. (new_pbb_from_pbb): Delete. (insert_out_of_ssa_copy_on_edge): Delete. (create_zero_dim_array): Delete. (scalar_close_phi_node_p): Delete. (propagate_expr_outside_region): Delete. (rewrite_close_phi_out_of_ssa): Delete. (rewrite_phi_out_of_ssa): Delete. (rewrite_degenerate_phi): Delete. (rewrite_reductions_out_of_ssa): Delete. (rewrite_cross_bb_scalar_dependence): Delete. (handle_scalar_deps_crossing_scop_limits): (rewrite_cross_bb_scalar_deps): Delete. (build_poly_scop): Remove calls to out-of-ssa functions. * graphite.c (graphite_transform_loops): Early return in case of codegen error. * sese.c (debug_rename_map_1): Delete. (debug_rename_map): Delete. (sese_record_loop): Remove macro. (build_sese_loop_nests): Same. (new_sese_info): Same. (free_sese_info): Same. (sese_insert_phis_for_liveouts): (is_loop_closed_ssa_use): New. (number_of_phi_nodes): New. (bb_contains_loop_close_phi_nodes): New. (bb_contains_loop_phi_nodes): New. (phi_uses_name): New. (is_valid_rename): (get_rename): Add old_bb and loop_phi for more precise matching of exprs. (set_rename): Pass region. (later_of_the_two): New. (gsi_insert_earliest): New. (collect_all_ssa_names): New. (substitute_ssa_name): New. (rename_all_uses): New. (get_rename_from_scev): New. (rename_uses): Pass old_bb for more precise matching of exprs. (get_def_bb_for_const): New. (get_new_name): New. (get_loc): New. (get_edges): New. (copy_loop_phi_args): New. (copy_loop_phi_nodes): New. (get_loop_init_value): New. (find_init_value): New. (find_init_value_close_phi): New. (copy_loop_close_phi_args): New. (copy_loop_close_phi_nodes): New. (add_phi_arg_for_new_expr): New. (copy_cond_phi_args): New. (copy_cond_phi_nodes): New. (copy_phi_nodes): New. (should_copy_to_new_region): New. (set_rename_for_each_def): New. (graphite_copy_stmts_from_block): Early return in case of error. (copy_bb_and_scalar_dependences): Same. * sese.h (vec_find): New. (SESE_PARAMS): Delete. (SESE_LOOPS): Delete. (SESE_LOOP_NEST): Delete. (sese_contains_loop): Remove macro usage. (sese_nb_params): Same. (struct gimple_poly_bb): Added read_scalar_refs, write_scalar_refs. Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r230200
2015-11-04remove parameter_rename_mapAditya Kumar1-72/+1
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_parameters): Remove. (graphite_regenerate_ast_isl): Remove call to copy_internal_parameters. * sese.c (new_sese_info): Do not initialize parameter_rename_map. (free_sese_info): Do not free parameter_rename_map. (set_rename): Do not use parameter_rename_map. (rename_uses): Update call to set_rename. (graphite_copy_stmts_from_block): Do not use parameter_rename_map. * sese.h (parameter_rename_map_t): Remove. (struct sese_info_t): Remove field parameter_rename_map. Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r229783
2015-11-04improve debug of codegenAditya Kumar1-0/+14
- 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): Moved out of anonymous namespace. * graphite-sese-to-poly.c (ssa_name_version_typesize): Remove. (isl_id_for_pbb): Use a buffer of size 10. (isl_id_for_ssa_name): Same. * sese.c (set_rename): Add more dumps. Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r229782
2015-10-27[PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FEMikhail Maltsev1-4/+2
[PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE gcc/lto/ChangeLog: 2015-10-27 Mikhail Maltsev <maltsevm@gmail.com> * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING conditionals. (lto_fixup_state): Likewise. (do_whole_program_analysis): Use symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING conditionals. gcc/ChangeLog: 2015-10-27 Mikhail Maltsev <maltsevm@gmail.com> * attribs.c (check_attribute_tables): New function, broken out from... (init_attributes): Use it. * cfgcleanup.c (try_optimize_cfg): Use flag_checking, CHECKING_P gcc_checking_assert and checking_* functions to eliminate ENABLE_CHECKING conditionals. * cfgexpand.c (expand_goto, expand_debug_expr): Likewise. (pass_expand::execute): Likewise. * cgraphclones.c (symbol_table::materialize_all_clones): Likewise. * cgraphunit.c (mark_functions_to_output): Likewise. (cgraph_node::expand_thunk): Likewise. (symbol_table::compile): Likewise. * ddg.c (add_cross_iteration_register_deps): Likewise. (create_ddg_all_sccs): Likewise. * df-core.c (df_finish_pass, df_analyze): Likewise. * diagnostic-core.h: Likewise. * diagnostic.c (diagnostic_report_diagnostic): Likewise. * dominance.c (calculate_dominance_info): Likewise. * dwarf2out.c (add_AT_die_ref): Likewise. (const_ok_for_output_1, mem_loc_descriptor): Likewise. (loc_list_from_tree, gen_lexical_block_die): Likewise. gen_type_die_with_usage, gen_type_die): Likewise. (dwarf2out_decl): Likewise. * emit-rtl.c (verify_rtx_sharing, reorder_insns_nobb): Likewise. * except.c (duplicate_eh_regions): Likewise. * fwprop.c (register_active_defs, update_df_init): Likewise. (fwprop_init, fwprop_done): Likewise. (update_uses): Likewise. * ggc-page.c (ggc_grow): Likewise. * gimplify.c (gimplify_body): Likewise. (gimplify_hasher::equal): Likewise. * graphite-isl-ast-to-gimple.c (graphite_verify): Likewise. * graphite-scop-detection.c (canonicalize_loop_closed_ssa_form): Likewise. * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Likewise. (rewrite_cross_bb_scalar_deps_out_of_ssa): Likwise. * hash-table.h (::find_empty_slot_for_expand): Likewise. * ifcvt.c (if_convert): Likewise. * ipa-cp.c (ipcp_propagate_stage): Likewise. * ipa-devirt.c (type_in_anonymous_namespace_p): Likewise. (odr_type_p, odr_types_equivalent_p): Likewise. (add_type_duplicate, get_odr_type): Likewise. * ipa-icf.c (sem_item_optimizer::execute): Likewise. (sem_item_optimizer::subdivide_classes_by_equality): Likewise. (sem_item_optimizer::verify_classes): Likewise. (sem_item_optimizer::traverse_congruence_split): Likewise. (sem_item_optimizer::checking_verify_classes): New. * ipa-icf.h (sem_item_optimizer::checking_verify_classes): Add new method. * cfgrtl.c (commit_edge_insertions): Likewise. (fixup_reorder_chain, cfg_layout_finalize): Likewise. (rtl_flow_call_edges_add): Likewise. * cgraph.c (symbol_table::create_edge): Likewise. (cgraph_edge::redirect_call_stmt_to_callee): Likewise. * cgraph.h (symtab_node): Likewise. (symtab_node::checking_verify_symtab_nodes): Define. (cgraph_node::checking_verify_cgraph_nodes): Define. * cfghooks.h (checking_verify_flow_info): Define. * cfgloop.h (checking_verify_loop_structure): Define. * dominance.h (checking_verify_dominators): Define. * et-forest.c: Fix comment. * ipa-inline-analysis.c (compute_inline_parameters): Use flag_checking, CHECKING_P gcc_checking_assert and checking_* functions to eliminate ENABLE_CHECKING conditionals. * ipa-inline-transform.c (save_inline_function_body): Likewise. * ipa-inline.c (inline_small_functions): Likewise. (early_inliner): Likewise. * ipa-inline.h (estimate_edge_growth): Likewise. * ipa-visibility.c (function_and_variable_visibility): Likewise. * ipa.c (symbol_table::remove_unreachable_nodes): Likewise. (ipa_single_use): Likewise. * ira-int.h: Likewise. * ira.c (ira): Likewise. * loop-doloop.c (doloop_optimize_loops): Likewise. * loop-init.c (loop_optimizer_init, fix_loop_structure): Likewise. * loop-invariant.c (move_loop_invariants): Likewise. * lra-assigns.c (lra_assign): Likewise. * lra-constraints.c (lra_constraints): Likewise. * lra-eliminations.c (lra_eliminate): Likewise. * lra-int.h (struct lra_reg): Likewise. * lra-lives.c (check_pseudos_live_through_calls): Likewise. (lra_create_live_ranges_1): Likewise. * lra-remat.c (create_remat_bb_data): Likewise. * lra.c (lra_update_insn_recog_data, restore_scratches): Likewise. (lra): Likewise. (check_rtl): Always define. Remove incorrect guard around extract_constrain_insn call. * lto-cgraph.c (input_cgraph_1: Use flag_checking, CHECKING_P gcc_checking_assert and checking_* functions to eliminate ENABLE_CHECKING conditionals. * lto-streamer-out.c (DFS::DFS): Likewise. (lto_output): Likewise. * lto-streamer.c (lto_streamer_init): Likewise. * omp-low.c (scan_omp_target, expand_omp_taskreg): Likewise. expand_omp_target, execute_expand_omp): Likewise. (lower_omp_target): Likewise. * passes.c (execute_function_todo): Likewise. (execute_todo, execute_one_pass): Likewise. (verify_curr_properties): Always define. * predict.c (tree_estimate_probability: Use flag_checking, CHECKING_P gcc_checking_assert and checking_* functions to eliminate ENABLE_CHECKING conditionals. (propagate_freq): Likewise. * pretty-print.c (pp_format): Likewise. * real.c (real_to_decimal_for_mode): Likewise. * recog.c (split_all_insns): Likewise. * regcprop.c (kill_value_one_regno): Likewise. (copy_value): Likewise. (validate_value_data): Define unconditionally. * reload.c: Fix comment. * timevar.c: Include options.h * tree-ssa.h (checking_verify_ssa): Define. * tree-ssa-loop-manip.h (checking_verify_loop_closed_ssa): Define. * sched-deps.c (CHECK): Remove unused macro. (add_or_update_dep_1, sd_add_dep: Use flag_checking, CHECKING_P gcc_checking_assert and checking_* functions to eliminate ENABLE_CHECKING conditionals. * sel-sched-ir.c (free_regset_pool, tidy_control_flow): Likewise. * sel-sched.c (struct moveop_static_params): Likewise. (find_best_reg_for_expr, move_cond_jump): Likewise. (move_op_orig_expr_not_found): Likewise. (code_motion_process_successors, move_op): Likewise. * ssa-iterators.h (first_readonly_imm_use): Likewise. (next_readonly_imm_use): Likewise. * store-motion.c (compute_store_table): Likewise. * symbol-summary.h (function_summary::function_summary): Likewise. * target.h (cumulative_args_t): Likewise. (get_cumulative_args, pack_cumulative_args): Likewise. * timevar.c: (timer::print): Likewise. * trans-mem.c (ipa_tm_execute): Likewise. * tree-cfg.c (move_stmt_op): Likewise. (move_sese_region_to_fn): Likewise. (gimple_flow_call_edges_add): Likewise. * tree-cfgcleanup.c (cleanup_tree_cfg_noloop, repair_loop_structures): Likewise. * tree-eh.c (remove_unreachable_handlers): Likewise. * tree-if-conv.c (pass_if_conversion::execute): Likewise. * tree-inline.c (expand_call_inline, optimize_inline_calls): Likewise. * tree-into-ssa.c (update_ssa): Likewise. * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise. * tree-outof-ssa.c (eliminate_useless_phis, rewrite_trees): Likewise. * tree-parloops.c (pass_parallelize_loops::execute): Likewise. * tree-predcom.c (suitable_component_p): Likewise. * tree-profile.c (gimple_gen_const_delta_profiler): Likewise. * tree-ssa-alias.c (refs_may_alias_p_1): Likewise. * tree-ssa-live.c (verify_live_on_entry): Likewise. * tree-ssa-live.h (register_ssa_partition): Likewise. * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely): Likewise. * tree-ssa-loop-manip.c (add_exit_phi): Likewise. (tree_transform_and_unroll_loop): Likewise. * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise. * tree-ssa-operands.c (get_expr_operands): Likewise. * tree-ssa-propagate.c (replace_exp_1): Likewise. * tree-ssa-structalias.c (rewrite_constraints): Likewise. * tree-ssa-ter.c (free_temp_expr_table): Likewise. * tree-ssa-threadupdate.c (duplicate_thread_path): Likewise. * tree-ssanames.c (release_ssa_name_fn): Likewise. * tree-stdarg.c (expand_ifn_va_arg): Likewise. * tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg): Likewise. (slpeel_checking_verify_cfg_after_peeling): Likewise. (vect_do_peeling_for_loop_bound): Likewise. (vect_do_peeling_for_alignment): Likewise. * tree-vrp.c (supports_overflow_infinity): Likewise. (set_value_range): Likewise. * tree.c (free_lang_data_in_cgraph): Likewise. * value-prof.c (gimple_remove_histogram_value): Likewise. (free_hist): Likewise. * var-tracking.c (canonicalize_values_star): Likewise. (compute_bb_dataflow, vt_find_locations, vt_emit_notes): Likewise. From-SVN: r229470
2015-10-21avoid generation of empty guards in trivial casesAditya Kumar1-4/+11
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. (translate_isl_ast_node_for): Check whether a guard has been generated. Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r229137
2015-10-21Refactoring sese.h and graphite-poly.hAditya Kumar1-4/+4
Rename scop->region to scop->scop_info Removed conversion constructors for sese_l and dr_info. Removed macros. No functional changed intended. Passes regtest and bootstrap. gcc/ChangeLog: 2015-19-10 Aditya Kumar <aditya.k7@samsung.com> * graphite-poly.h (struct dr_info): Removed conversion constructor. (struct scop): Renamed scop::region to scop::scop_info (scop_set_region): Same. (SCOP_REGION): Removed (SCOP_CONTEXT): Removed. (POLY_SCOP_P): Removed. * graphite-isl-ast-to-gimple.c (translate_isl_ast_node_user): Rename scop->region to scop->scop_info. (add_parameters_to_ivs_params): Same. (graphite_regenerate_ast_isl): Same. * graphite-poly.c (new_scop): Same. (free_scop): Same. (print_scop_params): Same. * graphite-scop-detection.c (scop_detection::remove_subscops): Same. (scop_detection::remove_intersecting_scops): Use pointer to sese_l. (dot_all_scops_1): Rename scop->region to scop->scop_info. (scop_detection::nb_pbbs_in_loops): Same. (find_scop_parameters): Same. (try_generate_gimple_bb): Same. (gather_bbs::before_dom_children): Same. (gather_bbs::after_dom_children): Same. (build_scops): Same. * graphite-sese-to-poly.c (build_scop_scattering): Same. (extract_affine_chrec): Same. (extract_affine): Same. (set_scop_parameter_dim): Same. (build_loop_iteration_domains): Same. (create_pw_aff_from_tree): Same. (add_param_constraints): Same. (build_scop_iteration_domain): Same. (build_scop_drs): Same. (analyze_drs_in_stmts): Same. (insert_out_of_ssa_copy_on_edge): Same. (rewrite_close_phi_out_of_ssa):Same. (rewrite_reductions_out_of_ssa):Same. (handle_scalar_deps_crossing_scop_limits):Same. (rewrite_cross_bb_scalar_deps):Same. (rewrite_cross_bb_scalar_deps_out_of_ssa):Same. (build_poly_scop):Same. (build_alias_set): Use pointer to dr_info. * graphite.c (print_graphite_scop_statistics): (graphite_transform_loops): * sese.h (struct sese_l): Remove conversion constructor. From-SVN: r229135