Age | Commit message (Collapse) | Author | Files | Lines |
|
PR tree-optimization/58697
* cfgloop.c (get_estimated_loop_iterations_int): Rename from
estimated_loop_iterations_int.
(max_stmt_executions_int): Call get_max_loop_iterations_int.
(get_max_loop_iterations_int): New. HWINT version of
get_max_loop_iterations.
* cfgloop.h: Add prototypes.
* loop-iv.c (find_simple_exit): call get_estimated_loop_iterations_int.
* loop-unroll.c (decide_peel_once_rolling): Call
get_estimated_loop_iterations_int.
* tree-ssa-loop-niter.c (estimated_loop_iterations_int): Add back.
* tree-ssa-loop-niter.h: Tweak prototypes.
From-SVN: r203709
|
|
* tree-flow.h: Move some protoypes. Include new tree-ssa-loop.h.
(struct affine_iv, struct tree_niter_desc): Move to tree-ssa-loop.h.
(enum move_pos): Move to tree-ssa-loop-im.h
* cfgloop.h: Move some prototypes.
(gcov_type_to_double_int): relocate from tree-ssa-loop.niter.c.
* tree-flow-inline.h (loop_containing_stmt): Move to tree-ssa-loop.h.
* tree-ssa-loop.h: New File. Include other tree-ssa-loop-*.h files.
(struct affine_iv, struct tree_niter_desc): Relocate from tree-flow.h.
(loop_containing_stmt): Relocate from tree-flow-inline.h.
* tree-ssa-loop-ch.c: (do_while_loop_p): Make static.
* tree-ssa-loop-im.c (for_each_index): Move to tree-ssa-loop.c.
(enum move_pos): Relocate here.
(lsm_tmp_name_add, gen_lsm_tmp_name, get_lsm_tmp_name): Move to
tree-ssa-loop.c.
(execute_sm_if_changed_flag_set): Change get_lsm_tmp_name call.
(tree_ssa_loop_im, gate_tree_ssa_loop_im, pass_data_lim, make_pass_lim):
Relocate here from tree-ssa-loop.c.
* tree-ssa-loop-ivcanon.c (tree_num_loop_insns): Move to
tree-ssa-loop.c.
(loop_edge_to_cancel, unloop_loops): Make static.
(tree_ssa_loop_ivcanon, gate_tree_ssa_loop_ivcanon, pass_data_iv_canon,
make_pass_iv_canon): Relocate from tree-ssa-loop.c.
(tree_complete_unroll, gate_tree_complete_unroll,
pass_data_complete_unroll, make_pass_complete_unroll): Relocate here.
(tree_complete_unroll_inner, gate_tree_complete_unroll_inner,
pass_data_complete_unrolli, make_pass_complete_unrolli): Relocate here.
* tree-ssa-loop-ivopts.c: Remove local prototypes.
(stmt_invariant_in_loop_p): Remove unused function.
* tree-ssa-loop-ivopts.h: New file. Add prototypes.
* tree-ssa-loop-manip.h: New file. Add prototypes.
* tree-ssa-loop-niter.c (record_niter_bound): Move to cfgloop.c.
(gcov_type_to_double_int): Move to cfgloop.h.
(double_int_cmp, bound_index,
estimate_numbers_of_iterations_loop): Make static.
(estimated_loop_iterations): Factor out get_estimated_loop_iterations.
(max_loop_iterations): Factor out get_max_loop_iterations.
(estimated_loop_iterations_int, max_stmt_executions_int): Move to
cfgloop.c.
* tree-ssa-loop-niter.h: New file. Add prototypes.
* tree-ssa-loop-prefetch.c (tree_ssa_loop_prefetch,
gate_tree_ssa_loop_prefetch, pass_data_loop_prefetch,
make_pass_loop_prefetch): Relocate from tree-ssa-loop.c.
* tree-ssa-loop-unswitch.c (tree_ssa_loop_unswitch,
gate_tree_ssa_loop_unswitch, pass_data_tree_unswitch,
make_pass_tree_unswitch): Relocate from tree-ssa-loop.c.
* tree-ssa-loop.c (tree_ssa_loop_im, gate_tree_ssa_loop_im,
pass_data_lim, make_pass_lim): Move to tree-ssa-loop-im.c.
(tree_ssa_loop_unswitch, gate_tree_ssa_loop_unswitch,
pass_data_tree_unswitch, make_pass_tree_unswitch): Move.
(tree_ssa_loop_ivcanon, gate_tree_ssa_loop_ivcanon, pass_data_iv_canon,
make_pass_iv_canon, tree_complete_unroll, gate_tree_complete_unroll,
pass_data_complete_unroll, make_pass_complete_unroll,
tree_complete_unroll_inner, gate_tree_complete_unroll_inner,
pass_data_complete_unrolli, make_pass_complete_unrolli): Move to
tree-ssa-loop-ivcanon.c.
(tree_ssa_loop_prefetch, gate_tree_ssa_loop_prefetch,
pass_data_loop_prefetch, make_pass_loop_prefetch): Move to
tree-ssa-loop-prefetch.c.
(for_each_index, lsm_tmp_name_add, gen_lsm_tmp_name): Relocate from
tree-ssa-loop-im.c.
(get_lsm_tmp_name): Relocate and add suffix parameter.
(tree_num_loop_insns): Relocate from tree-ssa-ivcanon.c.
* tree-scalar-evolution.h (simple_iv): Don't use affive_iv typedef.
* cfgloop.c (record_niter_bound, estimated_loop_iterations_int,
max_stmt_executions_int): Move from tree-ssa-loop-niter.c.
(get_estimated_loop_iterations): Factor out accessor from
estimated_loop_iterations in tree-ssa-loop-niter.c.
(get_max_loop_iterations): Factor out accessor from _max_loop_iterations
in tree-ssa-niter.c.
* loop-unroll.c (decide_unroll_constant_iterations,
decide_unroll_runtime_iterations, decide_peel_simple,
decide_unroll_stupid): Use new get_* accessors.
From-SVN: r203317
|
|
From-SVN: r202975
|
|
* Makefile.in (omp-low.o): Depend on $(TARGET_H).
* cfgloop.h (struct loop): Add safelen, force_vect, simduid.
* function.h (struct function): Add has_force_vect_loops and
has_simduid_loops.
* gimple-pretty-print.c (dump_gimple_omp_for): Handle
GF_OMP_FOR_KIND*.
* gimple.c (gimple_build_omp_critical): Add KIND argument and
handle it.
* gimple.def: Update CLAUSES comments.
* gimple.h (enum gf_mask): Add GF_OMP_FOR_KIND_{FOR,SIMD}.
(gimple_build_omp_for): Add argument to prototype.
(gimple_omp_for_kind): New.
(gimple_omp_for_set_kind): New.
* gimplify.c (enum gimplify_omp_var_data): Add GOVD_LINEAR to
GOVD_DATA_SHARE_CLASS.
(enum omp_region_type): Add ORT_SIMD.
(gimple_add_tmp_var): Handle ORT_SIMD.
(gimplify_var_or_parm_decl): Same.
(is_gimple_stmt): Same.
(omp_firstprivatize_variable): Same.
(omp_add_variable): Only use splay_tree_insert if lookup failed.
(omp_notice_variable): Handle ORT_SIMD.
(omp_is_private): Add SIMD argument and handle it as well as
ORT_SIMD.
(omp_check_private): Handle ORT_SIMD.
(gimplify_scan_omp_clauses): Handle OMP_CLAUSE_LINEAR and
OMP_CLAUSE_SAFELEN.
(gimplify_adjust_omp_clauses_1): Handle GOVD_LINEAR.
Handle OMP_CLAUSE_LASTPRIVATE.
(gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_LINEAR and
OMP_CLAUSE_SAFELEN.
(gimplify_omp_for): Handle OMP_SIMD and OMP_CLAUSE_LINEAR.
(gimplify_expr): Handle OMP_SIMD.
* internal-fn.c (expand_GOMP_SIMD_LANE): New.
(expand_GOMP_SIMD_VF): New.
(expand_GOMP_SIMD_LAST_LANE): New.
* internal-fn.def (GOMP_SIMD_LANE): New.
(GOMP_SIMD_VF): New.
(GOMP_SIMD_LAST_LANE): New.
* omp-low.c: Include target.h.
(extract_omp_for_data): Handle OMP_SIMD, OMP_CLAUSE_LINEAR,
OMP_CLAUSE_SAFELEN.
(check_omp_nesting_restrictions): Same.
(omp_max_vf): New.
(lower_rec_simd_input_clauses): New.
(lower_rec_input_clauses): Handle OMP_SIMD, GF_OMP_FOR_KIND_SIMD,
OMP_CLAUSE_LINEAR.
(lower_lastprivate_clauses): Handle OMP_CLAUSE_LINEAR,
GF_OMP_FOR_KIND_SIMD, OMP_SIMD.
(expand_omp_build_assign): New.
(expand_omp_for_init_counts): New.
(expand_omp_for_init_vars): New.
(extract_omp_for_update_vars): New.
(expand_omp_for_generic): Use expand_omp_for_{init,update}_vars
and rewrite accordingly.
(expand_omp_simd): New.
(expand_omp_for): Use expand_omp_simd.
(lower_omp_for_lastprivate): Unshare vinit when appropriate.
(lower_omp_for): Do not lower the body.
* tree-data-ref (get_references_in_stmt): Allow IFN_GOMP_SIMD_LANE
in their own loops.
* tree-flow.h (find_omp_clause): Remove prototype.
* tree-if-conv.c (main_tree_if_conversion): Run if doing if
conversion, forcing vectorization of the loop, or if
flag_tree_vectorize.
(gate_tree_if_conversion): Similarly.
* tree-inline.c (remap_gimple_stmt): Pass for kind argument to
gimple_build_omp_for.
(copy_cfg_body): set has_force_vect_loops and has_simduid_loops.
* tree-parloops (create_parallel_loop): Pass kind argument to
gimple_build_omp_for.
* tree-pretty-print.c (dump_omp_clause): Add cases for
OMP_CLAUSE_UNIFORM, OMP_CLAUSE_LINEAR, OMP_CLAUSE_SAFELEN,
OMP_CLAUSE__SIMDUID_.
(dump_generic_node): Handle OMP_SIMD.
* tree-ssa-ccp.c (likely_value): Handle IFN_GOMP_SIMD*.
* tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Do not
unroll OMP_SIMD loops here.
* tree-ssa-loop.c (gate_tree_vectorize): Run if
has_force_vect_loops.
* tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Handle
loop->safelen
(vect_analyze_data_refs): Handle simd loops.
* tree-vect-loop.c (vectorizable_live_operation): Handle
IFN_GOMP_SIMD*.
* tree-vect-stmts.c (vectorizable_call): Handle
IFN_GOMP_SIMD_LANE.
(vectorizable_store): Handle STMT_VINFO_SIMD_LANE_ACCESS_P.
(vectorizable_load): Same.
* tree-vectorizer.c: Include hash-table.h and
tree-ssa-propagate.h.
(struct simduid_to_vf): New.
(simduid_to_vf::hash): New.
(simduid_to-vf::equal): New.
(struct simd_array_to_simduid): New.
(simd_array_to_simduid::hash): New.
(simd_array_to_simduid::equal): New.
(adjust_simduid_builtins): New.
(struct note_simd_array_uses_struct): New.
(note_simd_array_uses_cb): New.
(note_simd_array_uses): New.
(vectorize_loops): Handle simd hints and adjust simd builtins
accordingly.
* tree-vectorizer.h (struct _stmt_vec_info): Add
simd_lane_access_p field.
(STMT_VINFO_SIMD_LANE_ACCESS_P): New macro.
* tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_LINEAR,
OMP_CLAUSE_SAFELEN, OMP_CLAUSE__SIMDUID_, OMP_CLAUSE_UNIFORM.
(omp_clause_code_name): Same.
(walk_tree_1): Handle OMP_CLAUSE_UNIFORM, OMP_CLAUSE_SAFELEN,
OMP_CLAUSE__SIMDUID_, OMP_CLAUSE_LINEAR.
* tree.def (OMP_SIMD): New entry.
* tree.h (enum omp_clause_code): Add entries for
OMP_CLAUSE_LINEAR, OMP_CLAUSE_UNIFORM, OMP_CLAUSE_SAFELEN,
OMP_CLAUSE__SIMDUID_.
(OMP_CLAUSE_DECL): Adjust range for new clauses.
(OMP_CLAUSE_LINEAR_NO_COPYIN): New.
(OMP_CLAUSE_LINEAR_NO_COPYOUT): New.
(OMP_CLAUSE_LINEAR_STEP): New.
(OMP_CLAUSE_SAFELEN_EXPR): New.
(OMP_CLAUSE__SIMDUID__DECL): New.
(find_omp_clause): New prototype.
cp/
* cp-tree.h (CP_OMP_CLAUSE_INFO): Adjust range for new clauses.
Co-Authored-By: Aldy Hernandez <aldyh@redhat.com>
From-SVN: r202029
|
|
2013-04-30 Richard Biener <rguenther@suse.de>
* function.h (loops_for_fn): New inline function.
(set_loops_for_fn): Likewise.
* cfgloop.h (place_new_loop): Add struct function parameter.
(get_loop): Likewise.
(get_loops): Likewise.
(number_of_loops): Likewise.
(fel_next): Adjust.
(fel_init): Likewise.
* cfg.c (get_loop_copy): Adjust.
* cfgloop.c (flow_loops_dump): Likewise.
(record_loop_exits): Likewise.
(verify_loop_structure): Likewise.
* cfgloopanal.c (mark_irreducible_loops): Likewise.
(estimate_reg_pressure_cost): Likewise.
(mark_loop_exit_edges): Likewise.
* cfgloopmanip.c (place_new_loop): Likewise.
(add_loop): Likewise.
(duplicate_loop): Likewise.
* graph.c (draw_cfg_nodes): Likewise.
* graphite-clast-to-gimple.c (translate_clast_user): Likewise.
* graphite-sese-to-poly.c (build_scop_scattering): Likewise.
(extract_affine_chrec): Likewise.
(build_scop_iteration_domain): Likewise.
* graphite.c (graphite_initialize): Likewise.
* ira-build.c (create_loop_tree_nodes): Likewise.
(more_one_region_p): Likewise.
(rebuild_regno_allocno_maps): Likewise.
(mark_loops_for_removal): Likewise.
(mark_all_loops_for_removal): Likewise.
(remove_unnecessary_regions): Likewise.
(ira_build): Likewise.
* ira-emit.c (setup_entered_from_non_parent_p): Likewise.
* loop-init.c (fix_loop_structure): Likewise.
(gate_rtl_move_loop_invariants): Likewise.
(gate_rtl_unswitch): Likewise.
(gate_rtl_unroll_and_peel_loops): Likewise.
(rtl_doloop): Likewise.
* lto-streamer-in.c (input_cfg): Likewise.
* lto-streamer-out.c (output_cfg): Likewise.
* modulo-sched.c (sms_schedule): Likewise.
* predict.c (tree_estimate_probability): Likewise.
(tree_estimate_probability_driver): Likewise.
(estimate_loops): Likewise.
* tree-cfg.c (fixup_loop_arrays_after_move): Likewise.
(move_sese_region_to_fn): Likewise.
(debug_loop_num): Likewise.
* tree-chrec.c (chrec_evaluate): Likewise.
(hide_evolution_in_other_loops_than_loop): Likewise.
(chrec_component_in_loop_num): Likewise.
(reset_evolution_in_loop): Likewise.
(evolution_function_is_invariant_rec_p): Likewise.
* tree-if-conv.c (main_tree_if_conversion): Likewise.
* tree-inline.c (copy_loops): Likewise.
(copy_cfg_body): Likewise.
(tree_function_versioning): Likewise.
* tree-loop-distribution.c (rdg_flag_loop_exits): Likewise.
* tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop):
Likewise.
(add_to_evolution_1): Likewise.
(scev_const_prop): Likewise.
* tree-scalar-evolution.h (get_chrec_loop): Likewise.
* tree-ssa-loop-ch.c (copy_loop_headers): Likewise.
* tree-ssa-loop-im.c (analyze_memory_references): Likewise.
(tree_ssa_lim_initialize): Likewise.
* tree-ssa-loop-manip.c (rewrite_into_loop_closed_ssa): Likewise.
(verify_loop_closed_ssa): Likewise.
* tree-ssa-loop.c (tree_ssa_loop_init): Likewise.
(tree_ssa_loop_im): Likewise.
(tree_ssa_loop_unswitch): Likewise.
(tree_vectorize): Likewise.
(check_data_deps): Likewise.
(tree_ssa_loop_ivcanon): Likewise.
(tree_ssa_loop_bounds): Likewise.
(tree_complete_unroll): Likewise.
(tree_complete_unroll_inner): Likewise.
(tree_parallelize_loops): Likewise.
(tree_ssa_loop_prefetch): Likewise.
(tree_ssa_loop_ivopts): Likewise.
* tree-ssa.c (execute_update_addresses_taken): Liekwise.
* tree-vectorizer.c (vectorize_loops): Likewise.
From-SVN: r198441
|
|
2013-04-26 Richard Biener <rguenther@suse.de>
* Makefile.in (lto-streamer-in.o): Add $(CFGLOOP_H) dependency.
(lto-streamer-out.o): Likewise.
* cfgloop.c (init_loops_structure): Export, add struct function
argument and adjust.
(flow_loops_find): Adjust.
* cfgloop.h (enum loop_estimation): Add EST_LAST.
(init_loops_structure): Declare.
* lto-streamer-in.c: Include cfgloop.h.
(input_cfg): Input the loop tree.
* lto-streamer-out.c: Include cfgloop.h.
(output_cfg): Output the loop tree.
(output_struct_function_base): Do not drop PROP_loops.
From-SVN: r198334
|
|
2013-03-26 Richard Biener <rguenther@suse.de>
* tree-cfg.c (execute_build_cfg): Build the loop tree.
(pass_build_cfg): Provide PROP_loops.
(move_sese_region_to_fn): Remove loops that are outlined into fn
for now.
* tree-inline.c: Include cfgloop.h.
(initialize_cfun): Do not drop PROP_loops.
(copy_loops): New function.
(copy_cfg_body): Copy loop structure.
(tree_function_versioning): Initialize destination loop tree.
* tree-ssa-loop.c (pass_tree_loop_init): Do not provide PROP_loops.
(pass_parallelize_loops): Do IL verification.
* loop-init.c (loop_optimizer_init): Fixup loops if required.
* tree-optimize.c (execute_fixup_cfg): If we need to cleanup
the CFG make sure we fixup loops as well.
* tree-ssa-tail-merge.c: Include cfgloop.h.
(replace_block_by): When merging loop latches mark loops for fixup.
* lto-streamer-out.c (output_struct_function_base): Drop
PROP_loops for now.
* tree-ssa-phiopt.c: Include tree-scalar-evolution.h.
(tree_ssa_cs_elim): Initialize the loop optimizer and SCEV.
* ipa-split.c: Include cfgloop.h.
(split_function): Add the new return block to the loop tree root.
* tree-cfgcleanup.c (remove_forwarder_block_with_phi): Return
whether we have removed the forwarder block.
(merge_phi_nodes): If we removed a forwarder mark loops for fixup.
* cfgloop.h (place_new_loop): Declare.
* cfgloopmanip.c (place_new_loop): Export.
* Makefile.in (asan.o): Add $(CFGLOOP_H) dependency.
(tree-switch-conversion.o): Likewise.
(tree-complex.o): Likewise.
(tree-inline.o): Likewise.
(tree-ssa-tailmerge.o): Likewise.
(ipa-split.o): Likewise.
(tree-ssa-phiopt.o): Add $(SCEV_H) dependency.
(tree-ssa-copy.o): Likewise.
* tree-switch-conversion.c: Include cfgloop.h
(process_switch): If we emit a bit-test cascade, schedule loops
for fixup.
* tree-complex.c: Include cfgloop.h.
(expand_complex_div_wide): Properly add new basic-blocks to loops.
* asan.c: Include cfgloop.h.
(create_cond_insert_point): Properly add new basic-blocks to
loops, schedule loop fixup.
* cfgloop.c (verify_loop_structure): Check that looks are not
marked for fixup.
* omp-low.c (expand_parallel_call): Properly add new basic-blocks
to loops.
(expand_omp_for_generic): Likewise.
(expand_omp_sections): Likewise.
(expand_omp_atomic_pipeline): Schedule loops for fixup.
* tree-ssa-copy.c: Include tree-scalar-evolution.h.
(fini_copy_prop): Disable DCE in substitute_and_fold if SCEV
is initialized, not when loops are present.
* tree-parloops.c (parallelize_loops): Remove checking here.
* passes.c (init_optimization_passes): Schedule a copy-propagation
pass before complete unrolling of inner loops.
* gcc.dg/tree-prof/update-loopch.c: Revert last change.
* gcc.dg/graphite/pr33766.c: Fix undefined behavior.
* gcc.dg/pr53265.c: Remove XFAILs.
* gcc.dg/tree-ssa/loop-38.c: Remove unreliable dump scanning.
* gcc.dg/tree-ssa/pr21559.c: Change back to two expected jump threads.
From-SVN: r198333
|
|
doloop_optimize_loops for PPC)
2013-04-17 Richard Biener <rguenther@suse.de>
PR rtl-optimization/56921
* cfgloop.h (struct loop): Add simple_loop_desc member.
(struct niter_desc): Mark with GTY(()).
(simple_loop_desc): Do not use aux field but simple_loop_desc.
* loop-iv.c (get_simple_loop_desc): Likewise.
(free_simple_loop_desc): Likewise.
Revert
2013-04-16 Richard Biener <rguenther@suse.de>
PR rtl-optimization/56921
* loop-init.c (pass_rtl_move_loop_invariants): Add
TODO_do_not_ggc_collect to todo_flags_finish.
(pass_rtl_unswitch): Same.
(pass_rtl_unroll_and_peel_loops): Same.
(pass_rtl_doloop): Same.
From-SVN: r198025
|
|
iteration count)
PR tree-optimization/53265
* common.opt (Waggressive-loop-optimizations): New option.
* tree-ssa-loop-niter.c: Include tree-pass.h.
(do_warn_aggressive_loop_optimizations): New function.
(record_estimate): Call it. Don't add !is_exit bounds to loop->bounds
if number_of_latch_executions returned constant.
(estimate_numbers_of_iterations_loop): Call number_of_latch_executions
early. If number_of_latch_executions returned constant, set
nb_iterations_upper_bound back to it.
* cfgloop.h (struct loop): Add warned_aggressive_loop_optimizations
field.
* Makefile.in (tree-ssa-loop-niter.o): Depend on $(TREE_PASS_H).
* doc/invoke.texi (-Wno-aggressive-loop-optimizations): Document.
* gcc.dg/pr53265.c: New test.
* gcc.dg/torture/pr49518.c: Add -Wno-aggressive-loop-optimizations
to dg-options.
* g++.dg/opt/longbranch2.C (EBCOTLut): Double sizes of a2 and a3
arrays.
* gcc.dg/tree-ssa/cunroll-10.c (main): Rename to foo. Add argument
n, use it as high bound instead of 4.
* unwind-dw2.c (execute_cfa_program): Avoid
-Waggressive-array-optimizations warnings for DW_CFA_GNU_window_save
on targets with DWARF_FRAME_REGISTERS < 32.
* testsuite/libmudflap.c/fail37-frag.c: Add optimization barrier.
From-SVN: r196650
|
|
tree-ssa-loop-manip.c:557)
2013-02-11 Richard Biener <rguenther@suse.de>
PR tree-optimization/56264
* cfgloop.h (fix_loop_structure): Adjust prototype.
* loop-init.c (fix_loop_structure): Return the number of
newly discovered loops.
* tree-cfgcleanup.c (repair_loop_structures): When new loops
are discovered, do a full loop-closed SSA rewrite.
* gcc.dg/torture/pr56264.c: New testcase.
From-SVN: r195941
|
|
cfgloop.c:1581 with -ftracer)
2013-02-08 Richard Biener <rguenther@suse.de>
PR middle-end/56181
* cfgloop.h (flow_loops_find): Adjust.
(bb_loop_header_p): Declare.
* cfgloop.c (bb_loop_header_p): New function split out from ...
(flow_loops_find): ... here. Adjust function signature,
support incremental loop structure update.
(verify_loop_structure): Cleanup. Verify a loop is a loop.
* cfgloopmanip.c (fix_loop_structure): Move ...
* loop-init.c (fix_loop_structure): ... here.
(apply_loop_flags): Split out from ...
(loop_optimizer_init): ... here.
(fix_loop_structure): Use apply_loop_flags. Use flow_loops_find
in incremental mode, only remove dead loops here.
* gcc.dg/torture/pr56181.c: New testcase.
From-SVN: r195879
|
|
From-SVN: r195098
|
|
basic-block.h:944 with -ftree-vectorize)
PR tree-optimization/55569
* cfgloopmanip.c (scale_loop_profile): Make ITERATION_BOUND gcov_type.
* cfgloop.h (scale_loop_profile): Likewise.
From-SVN: r195067
|
|
From-SVN: r194903
|
|
2013-01-02 Teresa Johnson <tejohnson@google.com>
* dumpfile.c (dump_loc): Print filename with location.
* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Use
new location_t parameter to emit complete unroll message with
new dump framework.
(canonicalize_loop_induction_variables): Compute loops location
and pass to try_unroll_loop_completely.
* loop-unroll.c (report_unroll_peel): New function.
(peel_loops_completely): Use new dump format with location
for main dumpfile message, and invoke report_unroll_peel on success.
(decide_unrolling_and_peeling): Ditto.
(decide_peel_once_rolling): Remove old dumpfile message subsumed
by report_unroll_peel.
(decide_peel_completely): Ditto.
(decide_unroll_constant_iterations): Ditto.
(decide_unroll_runtime_iterations): Ditto.
(decide_peel_simple): Ditto.
(decide_unroll_stupid): Ditto.
* cfgloop.c (get_loop_location): New function.
* cfgloop.h (get_loop_location): Declare.
testsuite/
* gcc.dg/tree-ssa/loop-1.c: Update expected dump message.
* gcc.dg/tree-ssa/loop-23.c: Ditto.
* gcc.dg/tree-ssa/cunroll-1.c: Ditto.
* gcc.dg/tree-ssa/cunroll-2.c: Ditto.
* gcc.dg/tree-ssa/cunroll-3.c: Ditto.
* gcc.dg/tree-ssa/cunroll-4.c: Ditto.
* gcc.dg/tree-ssa/cunroll-5.c: Ditto.
* gcc.dg/unroll_1.c: Ditto.
* gcc.dg/unroll_2.c: Ditto.
* gcc.dg/unroll_3.c: Ditto.
* gcc.dg/unroll_4.c: Ditto.
From-SVN: r194829
|
|
on the template class 'vec'.
This patch rewrites the old VEC macro-based interface into a new one
based on the template class 'vec'. The user-visible changes are
described in http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec.
I have tested the patch pretty extensively:
- Regular bootstraps on x86_64, ppc, ia64, sparc and hppa.
- Bootstraps with --enable-checking=release
- Bootstraps with --enable-checking=gc,gcac
- Basic builds on all targets (using contrib/config-list.mk).
We no longer access the vectors via VEC_* macros. The pattern is
"VEC_operation (T, A, V, args)" becomes "V.operation (args)".
The only thing I could not do is create proper ctors and dtors for the
vec class. Since these vectors are stored in unions, we
have to keep them as PODs (C++03 does not allow non-PODs in unions).
This means that creation and destruction must be explicit. There is a
new method vec<type, allocation, layout>::create() and another vec<type,
allocation, layout>::destroy() to allocate the internal vector.
For vectors that must be pointers, there is a family of free functions
that implement the operations that need to tolerate NULL vectors.
These functions all start with the prefix 'vec_safe_'. See the wiki
page for details.
The gengtype change removes the special handling for VEC() that used
to exist in gengtype. Additionally, it allows gengtype to recognize
templates of more than one argument and introduces the concept of an
undefined type (useful for template arguments that may or may not be
types).
When a TYPE_UNDEFINED is reached, gengtype will ignore it if it
happens inside a type marked with GTY((user)). Otherwise, it will
emit an error.
Finally, gengtype rejects root types marked GTY((user)) that are not
first class pointers.
2012-11-16 Diego Novillo <dnovillo@google.com>
VEC API overhaul (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
* vec.c (register_overhead): Convert it into
member function of vec_prefix.
(release_overhead): Likewise.
(calculate_allocation): Likewise.
(vec_heap_free): Remove.
(vec_gc_o_reserve_1): Remove.
(vec_heap_o_reserve_1): Remove.
(vec_stack_o_reserve_1): Remove.
(vec_stack_o_reserve_exact): Remove.
(register_stack_vec): New.
(stack_vec_register_index): New.
(unregister_stack_vec): New.
(vec_assert_fail): Remove.
* vec.h: Conditionally include ggc.h. Document conditional
hackery.
Update top-level documentation.
(ALONE_VEC_CHECK_INFO): Remove.
(VEC_CHECK_INFO): Remove.
(ALONE_VEC_CHECK_DECL): Remove.
(VEC_CHECK_DECL): Remove.
(ALONE_VEC_CHECK_PASS): Remove.
(VEC_CHECK_PASS): Remove.
(VEC_ASSERT): Remove.
(vec_prefix): Add friends va_gc, va_gc_atomic, va_heap and
va_stack.
Mark fields alloc_ and num_ as protected.
(struct vec_t): Remove. Remove all function members.
(struct vl_embed): Declare.
(struct vl_ptr): Declare.
(free): Remove.
(reserve_exact): Remove.
(reserve): Remove.
(safe_splice): Remove.
(safe_push): Remove.
(safe_grow): Remove.
(safe_grow_cleared): Remove.
(safe_insert): Remove.
(DEF_VEC_I): Remove.
(DEF_VEC_ALLOC_I): Remove.
(DEF_VEC_P): Remove.
(DEF_VEC_ALLOC_P): Remove.
(DEF_VEC_O): Remove.
(DEF_VEC_ALLOC_O): Remove.
(DEF_VEC_ALLOC_P_STACK): Remove.
(DEF_VEC_ALLOC_O_STACK): Remove.
(DEF_VEC_ALLOC_I_STACK): Remove.
(DEF_VEC_A): Remove.
(DEF_VEC_ALLOC_A): Remove.
(vec_stack_p_reserve_exact_1): Remove.
(vec_stack_o_reserve): Remove.
(vec_stack_o_reserve_exact): Remove.
(VEC_length): Remove.
(VEC_empty): Remove.
(VEC_address): Remove.
(vec_address): Remove.
(VEC_last): Remove.
(VEC_index): Remove.
(VEC_iterate): Remove.
(VEC_embedded_size): Remove.
(VEC_embedded_init): Remove.
(VEC_free): Remove.
(VEC_copy): Remove.
(VEC_space): Remove.
(VEC_reserve): Remove.
(VEC_reserve_exact): Remove.
(VEC_splice): Remove.
(VEC_safe_splice): Remove.
(VEC_quick_push): Remove.
(VEC_safe_push): Remove.
(VEC_pop): Remove.
(VEC_truncate): Remove.
(VEC_safe_grow): Remove.
(VEC_replace): Remove.
(VEC_quick_insert): Remove.
(VEC_safe_insert): Remove.
(VEC_ordered_remove): Remove.
(VEC_unordered_remove): Remove.
(VEC_block_remove): Remove.
(VEC_lower_bound): Remove.
(VEC_alloc): Remove.
(VEC_qsort): Remove.
(va_heap): Declare.
(va_heap::default_layout): New typedef to vl_ptr.
(va_heap::reserve): New.
(va_heap::release): New.
(va_gc): Declare.
(va_gc::default_layout): New typedef to vl_embed.
(va_gc::reserve): New.
(va_gc::release): New.
(va_gc_atomic): Declare. Inherit from va_gc.
(va_stack): Declare.
(va_stack::default_layout): New typedef to vl_ptr.
(va_stack::alloc): New.
(va_stack::reserve): New.
(va_stack::release): New.
(register_stack_vec): Declare.
(stack_vec_register_index): Declare.
(unregister_stack_vec): Declare.
(vec<T, A = va_heap, L = typename A::default_layout>): Declare
empty vec template.
(vec<T, A, vl_embed>): Partial specialization for embedded
layout.
(vec<T, A, vl_embed>::allocated): New.
(vec<T, A, vl_embed>::length): New.
(vec<T, A, vl_embed>::is_empty): New.
(vec<T, A, vl_embed>::address): New.
(vec<T, A, vl_embed>::operator[]): New.
(vec<T, A, vl_embed>::last New.
(vec<T, A, vl_embed>::space): New.
(vec<T, A, vl_embed>::iterate): New.
(vec<T, A, vl_embed>::iterate): New.
(vec<T, A, vl_embed>::copy): New.
(vec<T, A, vl_embed>::splice): New.
(vec<T, A, vl_embed>::quick_push New.
(vec<T, A, vl_embed>::pop New.
(vec<T, A, vl_embed>::truncate): New.
(vec<T, A, vl_embed>::quick_insert): New.
(vec<T, A, vl_embed>::ordered_remove): New.
(vec<T, A, vl_embed>::unordered_remove): New.
(vec<T, A, vl_embed>::block_remove): New.
(vec<T, A, vl_embed>::qsort): New.
(vec<T, A, vl_embed>::lower_bound): New.
(vec<T, A, vl_embed>::embedded_size): New.
(vec<T, A, vl_embed>::embedded_init): New.
(vec<T, A, vl_embed>::quick_grow): New.
(vec<T, A, vl_embed>::quick_grow_cleared): New.
(vec_safe_space): New.
(vec_safe_length): New.
(vec_safe_address): New.
(vec_safe_is_empty): New.
(vec_safe_reserve): New.
(vec_safe_reserve_exact): New.
(vec_alloc): New.
(vec_free): New.
(vec_safe_grow): New.
(vec_safe_grow_cleared): New.
(vec_safe_iterate): New.
(vec_safe_push): New.
(vec_safe_insert): New.
(vec_safe_truncate): New.
(vec_safe_copy): New.
(vec_safe_splice): New.
(vec<T, A, vl_ptr>): New partial specialization for the space
efficient layout.
(vec<T, A, vl_ptr>::exists): New.
(vec<T, A, vl_ptr>::is_empty): New.
(vec<T, A, vl_ptr>::length): New.
(vec<T, A, vl_ptr>::address): New.
(vec<T, A, vl_ptr>::operator[]): New.
(vec<T, A, vl_ptr>::operator!=): New.
(vec<T, A, vl_ptr>::operator==): New.
(vec<T, A, vl_ptr>::last): New.
(vec<T, A, vl_ptr>::space): New.
(vec<T, A, vl_ptr>::iterate): New.
(vec<T, A, vl_ptr>::copy): New.
(vec<T, A, vl_ptr>::reserve): New.
(vec<T, A, vl_ptr>::reserve_exact): New.
(vec<T, A, vl_ptr>::splice): New.
(vec<T, A, vl_ptr>::safe_splice): New.
(vec<T, A, vl_ptr>::quick_push): New.
(vec<T, A, vl_ptr>::safe_push): New.
(vec<T, A, vl_ptr>::pop): New.
(vec<T, A, vl_ptr>::truncate): New.
(vec<T, A, vl_ptr>::safe_grow): New.
(vec<T, A, vl_ptr>::safe_grow_cleared): New.
(vec<T, A, vl_ptr>::quick_grow): New.
(vec<T, A, vl_ptr>::quick_grow_cleared): New.
(vec<T, A, vl_ptr>::quick_insert): New.
(vec<T, A, vl_ptr>::safe_insert): New.
(vec<T, A, vl_ptr>::ordered_remove): New.
(vec<T, A, vl_ptr>::unordered_remove): New.
(vec<T, A, vl_ptr>::block_remove): New.
(vec<T, A, vl_ptr>::qsort): New.
(vec<T, A, vl_ptr>::lower_bound): New.
(vec_stack_alloc): Define.
(FOR_EACH_VEC_SAFE_ELT): Define.
* vecir.h: Remove. Update all users.
* vecprim.h: Remove. Update all users.
Move uchar to coretypes.h.
* Makefile.in (VEC_H): Add $(GGC_H).
Remove vecir.h and vecprim.h dependencies everywhere.
2012-11-16 Diego Novillo <dnovillo@google.com>
* gengtype-lex.l (VEC): Remove.
Add characters in the set [\!\>\.-].
* gengtype-parse.c (token_names): Remove "VEC".
(require_template_declaration): Remove handling of VEC_TOKEN.
(type): Likewise.
Call create_user_defined_type when parsing GTY((user)).
* gengtype-state.c (type_lineloc): handle TYPE_UNDEFINED.
(write_state_undefined_type): New.
(write_state_type): Call write_state_undefined_type for
TYPE_UNDEFINED.
(read_state_type): Call read_state_undefined_type for
TYPE_UNDEFINED.
* gengtype.c (dbgprint_count_type_at): Handle TYPE_UNDEFINED.
(create_user_defined_type): Make extern.
(type_for_name): Factor out of resolve_typedef.
(create_undefined_type): New
(resolve_typedef): Call it when we cannot find a previous
typedef and the type is not a template.
(find_structure): Accept TYPE_UNDEFINED.
(set_gc_used_type): Add argument ALLOWED_UNDEFINED_TYPES,
default to false.
Emit an error for TYPE_UNDEFINED unless LEVEL is GC_UNUSED or
ALLOWED_UNDEFINED_TYPES is set.
Set ALLOWED_UNDEFINED_TYPES to true for TYPE_USER_STRUCT.
(filter_type_name): Accept templates with more than one
argument.
(output_mangled_typename): Handle TYPE_UNDEFINED
(walk_type): Likewise.
(write_types_process_field): Likewise.
(write_func_for_structure): If CHAIN_NEXT is set, ORIG_S
should not be a user-defined type.
(write_types_local_user_process_field): Handle TYPE_ARRAY,
TYPE_NONE and TYPE_UNDEFINED.
(write_types_local_process_field): Likewise.
(contains_scalar_p): Return 0 for TYPE_USER_STRUCT.
(write_root): Reject user-defined types that are not pointers.
Handle TYPE_NONE, TYPE_UNDEFINED, TYPE_UNION, TYPE_LANG_STRUCT
and TYPE_PARAM_STRUCT.
(output_typename): Handle TYPE_NONE, TYPE_UNDEFINED, and
TYPE_ARRAY.
(dump_typekind): Handle TYPE_UNDEFINED.
* gengtype.h (enum typekind): Add TYPE_UNDEFINED.
(create_user_defined_type): Declare.
(enum gty_token): Remove VEC_TOKEN.
2012-11-16 Diego Novillo <dnovillo@google.com>
Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
* coretypes.h (uchar): Define.
* alias.c: Use new vec API in vec.h.
* asan.c: Likewise.
* attribs.c: Likewise.
* basic-block.h: Likewise.
* bb-reorder.c: Likewise.
* builtins.c: Likewise.
* calls.c: Likewise.
* cfg.c: Likewise.
* cfganal.c: Likewise.
* cfgcleanup.c: Likewise.
* cfgexpand.c: Likewise.
* cfghooks.c: Likewise.
* cfghooks.h: Likewise.
* cfgloop.c: Likewise.
* cfgloop.h: Likewise.
* cfgloopanal.c: Likewise.
* cfgloopmanip.c: Likewise.
* cfgrtl.c: Likewise.
* cgraph.c: Likewise.
* cgraph.h: Likewise.
* cgraphclones.c: Likewise.
* cgraphunit.c: Likewise.
* combine.c: Likewise.
* compare-elim.c: Likewise.
* coverage.c: Likewise.
* cprop.c: Likewise.
* data-streamer.h: Likewise.
* dbxout.c: Likewise.
* dce.c: Likewise.
* df-core.c: Likewise.
* df-problems.c: Likewise.
* df-scan.c: Likewise.
* dominance.c: Likewise.
* domwalk.c: Likewise.
* domwalk.h: Likewise.
* dse.c: Likewise.
* dwarf2cfi.c: Likewise.
* dwarf2out.c: Likewise.
* dwarf2out.h: Likewise.
* emit-rtl.c: Likewise.
* except.c: Likewise.
* except.h: Likewise.
* expr.c: Likewise.
* expr.h: Likewise.
* final.c: Likewise.
* fold-const.c: Likewise.
* function.c: Likewise.
* function.h: Likewise.
* fwprop.c: Likewise.
* gcc.c: Likewise.
* gcse.c: Likewise.
* genattr.c: Likewise.
* genattrtab.c: Likewise.
* genautomata.c: Likewise.
* genextract.c: Likewise.
* genopinit.c: Likewise
* ggc-common.c: Likewise.
* ggc.h: Likewise.
* gimple-low.c: Likewise.
* gimple-ssa-strength-reduction.c: Likewise.
* gimple-streamer-in.c: Likewise.
* gimple.c: Likewise.
* gimple.h: Likewise.
* gimplify.c: Likewise.
* graph.c: Likewise.
* graphds.c: Likewise.
* graphds.h: Likewise.
* graphite-blocking.c: Likewise.
* graphite-clast-to-gimple.c: Likewise.
* graphite-dependences.c: Likewise.
* graphite-interchange.c: Likewise.
* graphite-optimize-isl.c: Likewise.
* graphite-poly.c: Likewise.
* graphite-poly.h: Likewise.
* graphite-scop-detection.c: Likewise.
* graphite-scop-detection.h: Likewise.
* graphite-sese-to-poly.c: Likewise.
* graphite.c: Likewise.
* godump.c: Likewise.
* haifa-sched.c: Likewise.
* hw-doloop.c: Likewise.
* hw-doloop.h: Likewise.
* ifcvt.c: Likewise.
* insn-addr.h: Likewise.
* ipa-cp.c: Likewise.
* ipa-inline-analysis.c: Likewise.
* ipa-inline-transform.c: Likewise.
* ipa-inline.c: Likewise.
* ipa-inline.h: Likewise.
* ipa-prop.c: Likewise.
* ipa-prop.h: Likewise.
* ipa-pure-const.c: Likewise.
* ipa-ref-inline.h: Likewise.
* ipa-ref.c: Likewise.
* ipa-ref.h: Likewise.
* ipa-reference.c: Likewise.
* ipa-split.c: Likewise.
* ipa-utils.c: Likewise.
* ipa-utils.h: Likewise.
* ipa.c: Likewise.
* ira-build.c: Likewise.
* ira-color.c: Likewise.
* ira-emit.c: Likewise.
* ira-int.h: Likewise.
* ira.c: Likewise.
* loop-invariant.c: Likewise.
* loop-unroll.c: Likewise.
* lower-subreg.c: Likewise.
* lra-lives.c: Likewise.
* lra.c: Likewise.
* lto-cgraph.c: Likewise.
* lto-section-out.c: Likewise.
* lto-streamer-in.c: Likewise.
* lto-streamer-out.c: Likewise.
* lto-streamer.h: Likewise.
* lto-symtab.c: Likewise.
* mcf.c: Likewise.
* modulo-sched.c: Likewise.
* omp-low.c: Likewise.
* opts-common.c: Likewise.
* opts-global.c: Likewise.
* opts.c: Likewise.
* opts.h: Likewise.
* passes.c: Likewise.
* predict.c: Likewise.
* print-tree.c: Likewise.
* profile.c: Likewise.
* profile.h: Likewise.
* read-rtl.c: Likewise.
* ree.c: Likewise.
* reg-stack.c: Likewise.
* regrename.c: Likewise.
* regrename.h: Likewise.
* reload.c: Likewise.
* reload.h: Likewise.
* reload1.c: Likewise.
* rtl.h: Likewise.
* sched-deps.c: Likewise.
* sched-int.h: Likewise.
* sdbout.c: Likewise.
* sel-sched-dump.c: Likewise.
* sel-sched-ir.c: Likewise.
* sel-sched-ir.h: Likewise.
* sel-sched.c: Likewise.
* sese.c: Likewise.
* sese.h: Likewise.
* statistics.h: Likewise.
* stmt.c: Likewise.
* stor-layout.c: Likewise.
* store-motion.c: Likewise.
* tlink.c: Likewise.
* toplev.c: Likewise.
* trans-mem.c: Likewise.
* tree-browser.c: Likewise.
* tree-call-cdce.c: Likewise.
* tree-cfg.c: Likewise.
* tree-cfgcleanup.c: Likewise.
* tree-chrec.c: Likewise.
* tree-chrec.h: Likewise.
* tree-complex.c: Likewise.
* tree-data-ref.c: Likewise.
* tree-data-ref.h: Likewise.
* tree-dfa.c: Likewise.
* tree-diagnostic.c: Likewise.
* tree-dump.c: Likewise.
* tree-eh.c: Likewise.
* tree-emutls.c: Likewise.
* tree-flow.h: Likewise.
* tree-if-conv.c: Likewise.
* tree-inline.c: Likewise.
* tree-inline.h: Likewise.
* tree-into-ssa.c: Likewise.
* tree-iterator.c: Likewise.
* tree-loop-distribution.c: Likewise.
* tree-mudflap.c: Likewise.
* tree-optimize.c: Likewise.
* tree-outof-ssa.c: Likewise.
* tree-parloops.c: Likewise.
* tree-phinodes.c: Likewise.
* tree-predcom.c: Likewise.
* tree-pretty-print.c: Likewise.
* tree-scalar-evolution.c: Likewise.
* tree-sra.c: Likewise.
* tree-ssa-address.c: Likewise.
* tree-ssa-alias.c: Likewise.
* tree-ssa-ccp.c: Likewise.
* tree-ssa-coalesce.c: Likewise.
* tree-ssa-dce.c: Likewise.
* tree-ssa-dom.c: Likewise.
* tree-ssa-forwprop.c: Likewise.
* tree-ssa-live.c: Likewise.
* tree-ssa-live.h: Likewise.
* tree-ssa-loop-im.c: Likewise.
* tree-ssa-loop-ivcanon.c: Likewise.
* tree-ssa-loop-ivopts.c: Likewise.
* tree-ssa-loop-manip.c: Likewise.
* tree-ssa-loop-niter.c: Likewise.
* tree-ssa-loop-prefetch.c: Likewise.
* tree-ssa-math-opts.c: Likewise.
* tree-ssa-operands.c: Likewise.
* tree-ssa-phiopt.c: Likewise.
* tree-ssa-phiprop.c: Likewise.
* tree-ssa-pre.c: Likewise.
* tree-ssa-propagate.c: Likewise.
* tree-ssa-reassoc.c: Likewise.
* tree-ssa-sccvn.c: Likewise.
* tree-ssa-sccvn.h: Likewise.
* tree-ssa-strlen.c: Likewise.
* tree-ssa-structalias.c: Likewise.
* tree-ssa-tail-merge.c: Likewise.
* tree-ssa-threadedge.c: Likewise.
* tree-ssa-threadupdate.c: Likewise.
* tree-ssa-uncprop.c: Likewise.
* tree-ssa-uninit.c: Likewise.
* tree-ssa.c: Likewise.
* tree-ssanames.c: Likewise.
* tree-stdarg.c: Likewise.
* tree-streamer-in.c: Likewise.
* tree-streamer-out.c: Likewise.
* tree-streamer.c: Likewise.
* tree-streamer.h: Likewise.
* tree-switch-conversion.c: Likewise.
* tree-vect-data-refs.c: Likewise.
* tree-vect-generic.c: Likewise.
* tree-vect-loop-manip.c: Likewise.
* tree-vect-loop.c: Likewise.
* tree-vect-patterns.c: Likewise.
* tree-vect-slp.c: Likewise.
* tree-vect-stmts.c: Likewise.
* tree-vectorizer.c: Likewise.
* tree-vectorizer.h: Likewise.
* tree-vrp.c: Likewise.
* tree.c: Likewise.
* tree.h: Likewise.
* value-prof.c: Likewise.
* value-prof.h: Likewise.
* var-tracking.c: Likewise.
* varasm.c: Likewise.
* varpool.c: Likewise.
* vmsdbgout.c: Likewise.
* config/bfin/bfin.c: Likewise.
* config/c6x/c6x.c: Likewise.
* config/darwin.c: Likewise.
* config/i386/i386.c: Likewise.
* config/ia64/ia64.c: Likewise.
* config/mep/mep.c: Likewise.
* config/mips/mips.c: Likewise.
* config/pa/pa.c: Likewise.
* config/rs6000/rs6000-c.c: Likewise.
* config/rs6000/rs6000.c: Likewise.
* config/rx/rx.c: Likewise.
* config/spu/spu-c.c: Likewise.
* config/vms/vms.c: Likewise.
* config/vxworks.c: Likewise.
* config/epiphany/resolve-sw-modes.c: Likewise.
From-SVN: r193595
|
|
* cfgloopanal.c (get_loop_hot_path): New function.
* tree-ssa-lop-ivcanon.c (struct loop_size): Add CONSTANT_IV,
NUM_NON_PURE_CALLS_ON_HOT_PATH, NUM_PURE_CALLS_ON_HOT_PATH,
NUM_BRANCHES_ON_HOT_PATH.
(tree_estimate_loop_size): Compute the new values.
(try_unroll_loop_completely): Disable unrolling of loops with only
calls or too many branches.
(tree_unroll_loops_completely): Deal also with outer loops of hot loops.
* cfgloop.h (get_loop_hot_path): Declare.
* params.def (PARAM_MAX_PEEL_BRANCHES): New parameters.
* invoke.texi (max-peel-branches): Document.
* gcc.dg/tree-ssa/loop-1.c: Make to look like a good unroling candidate still.
* gcc.dg/tree-ssa/loop-23.c: Likewise.
* gcc.dg/tree-ssa/cunroll-1.c: Unrolling now happens early.
* gcc.dg/tree-prof/unroll-1.c: Remove confused dg-options.
From-SVN: r193246
|
|
tree-ssa-loop-manip.c:55)
PR middle-end/54967
* cfgloopmanip.c (fix_bb_placements): Add loop_closed_ssa_invalidated;
track basic blocks that moved out of their loops.
(unloop): Likewise.
(remove_path): Update.
(fix_loop_placements): Update.
* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Add
loop_closed_ssa_invalidated parameter; pass it around.
(canonicalize_loop_induction_variables): Update loop closed
SSA form if needed.
(tree_unroll_loops_completely): Likewise; do irred update out of
the outer loop; verify that SSA form is closed.
* cfgloop.h (unrloop): Update.
* gfortran.dg/pr54967.f90: New testcase.
From-SVN: r192709
|
|
* cfgloopmanip.c (copy_loop_info): New function.
(duplicate_loop): Use it.
(loop_version): Use it.
* loop-unswitch.c (unswitch_loop): Use it.
* cfgloop.h (copy_loop_info): Declare.
From-SVN: r192543
|
|
parameter and use it to estimate code optimized out in the...
* tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Add edge_to_cancel
parameter and use it to estimate code optimized out in the final iteration.
(loop_edge_to_cancel): New function.
(try_unroll_loop_completely): New IRRED_IVALIDATED parameter;
handle unrolling loops with bounds given via max_loop_iteratins;
handle unrolling non-inner loops when code size shrinks;
tidy dump output; when the last iteration loop still stays
as loop in the CFG forcongly redirect the latch to
__builtin_unreachable.
(canonicalize_loop_induction_variables): Add irred_invlaidated
parameter; record niter bound derrived; dump
max_loop_iterations bounds; call try_unroll_loop_completely
even if no niter bound is given.
(canonicalize_induction_variables): Handle irred_invalidated.
(tree_unroll_loops_completely): Handle non-innermost loops;
handle irred_invalidated.
* cfgloop.h (unlop): Declare.
* cfgloopmanip.c (unloop): Export.
* tree.c (build_common_builtin_nodes): Build BULTIN_UNREACHABLE.
* gcc.target/i386/l_fma_float_?.c: Update.
* gcc.target/i386/l_fma_double_?.c: Update.
* gfortran.dg/do_1.f90: XFAIL
* gcc.dg/tree-ssa/cunroll-1.c: New testcase.
* gcc.dg/tree-ssa/cunroll-2.c: New testcase.
* gcc.dg/tree-ssa/cunroll-3.c: New testcase.
* gcc.dg/tree-ssa/cunroll-4.c: New testcase.
* gcc.dg/tree-ssa/cunroll-5.c: New testcase.
* gcc.dg/tree-ssa/ldist-17.c: Block cunroll to make testcase still
valid.
From-SVN: r192538
|
|
loops with multiple exits realistically.
* tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop): Do not
predict loops with multiple exits realistically.
* cfgloopanal.c (single_likely_exit): New function.
From-SVN: r192434
|
|
From-SVN: r192261
|
|
prevent unswitching when...
* loop-unswitch.c (unswitch_single_loop): Use
estimated_loop_iterations_int to prevent unswitching when loop
is known to not roll.
* tree-ssa-loop-niter.c (estimated_loop_iterations): Do not segfault
when SCEV is not initialized.
(max_loop_iterations): Likewise.
* tree-ssa-loop-unswitch.c (tree_ssa_unswitch_loops): Use
estimated_loop_iterations_int to prevent unswithcing when
loop is known to not roll.
* tree-scalar-evolution.c (scev_initialized_p): New function.
* tree-scalar-evolution.h (scev_initialized_p): Likewise.
* loop-unroll.c (decide_peel_once_rolling): Use
max_loop_iterations_int.
(unroll_loop_constant_iterations): Update
nb_iterations_upper_bound and nb_iterations_estimate.
(decide_unroll_runtime_iterations): Use
estimated_loop_iterations or max_loop_iterations;
(unroll_loop_runtime_iterations): fix profile updating.
(decide_peel_simple): Use estimated_loop_iterations
and max_loop_iterations.
(decide_unroll_stupid): Use estimated_loop_iterations
ad max_loop_iterations.
* loop-doloop.c (doloop_modify): Use max_loop_iterations_int.
(doloop_optimize): Likewise.
* loop-iv.c (iv_number_of_iterations): Use record_niter_bound.
(find_simple_exit): Likewise.
* cfgloop.h (struct niter_desc): Remove niter_max.
From-SVN: r192219
|
|
* basic-block.h (RDIV): Define.
(EDGE_FREQUENCY): Simplify.
(check_probability, combine_probabilities, apply_probability,
inverse_probability): New.
* cfgloop.c (scale_loop_profile): New function.
* cfgloop.h (scale_loop_profile): Declare.
(slpeel_add_loop_guard): Add probability parameter.
(set_prologue_iterations): Add probability parameter.
(slpeel_tree_peel_loop_to_edge): Add bound1 and bound2 parameters;
update probabilities correctly.
(vect_do_peeling_for_alignment, vect_gen_niters_for_prolog_loop): New.
From-SVN: r191839
|
|
2012-08-16 Richard Guenther <rguenther@suse.de>
PR middle-end/54146
* tree-ssa-loop-niter.c (find_loop_niter_by_eval): Free the
exit vector.
* ipa-pure-const.c (analyze_function): Use FOR_EACH_LOOP_BREAK.
* cfgloop.h (FOR_EACH_LOOP_BREAK): Fix.
* tree-ssa-structalias.c (handle_lhs_call): Properly free rhsc.
* tree-into-ssa.c (get_ssa_name_ann): Allocate info only when
needed.
* tree-ssa-loop-im.c (analyze_memory_references): Adjust.
(tree_ssa_lim_finalize): Free all mem_refs.
* tree-ssa-sccvn.c (extract_and_process_scc_for_name): Free
scc when bailing out.
* modulo-sched.c (sms_schedule): Use FOR_EACH_LOOP_BREAK.
* ira-build.c (loop_with_complex_edge_p): Free loop exit vector.
* graphite-sese-to-poly.c (scop_ivs_can_be_represented): Use
FOR_EACH_LOOP_BREAK.
From-SVN: r190445
|
|
index members next to each other.
2012-08-13 Richard Guenther <rguenther@suse.de>
* basic-block.h (struct basic_block): Remove loop_depth
member, move flags and index members next to each other.
* cfgloop.h (bb_loop_depth): New inline function.
* cfghooks.c (split_block): Do not set loop_depth.
(duplicate_block): Likewise.
* cfgloop.c (flow_loop_nodes_find): Likewise.
(flow_loops_find): Likewise.
(add_bb_to_loop): Likewise.
(remove_bb_from_loops): Likewise.
* cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
* gimple-streamer-in.c (input_bb): Do not stream loop_depth.
* gimple-streamer-out.c (output_bb): Likewise.
* bt-load.c: Include cfgloop.h.
(migrate_btr_defs): Use bb_loop_depth.
* cfg.c (dump_bb_info): Likewise.
* final.c (compute_alignments): Likewise.
* ira.c (update_equiv_regs): Likewise.
* tree-ssa-copy.c (init_copy_prop): Likewise.
* tree-ssa-dom.c (loop_depth_of_name): Likewise.
* tree-ssa-forwprop.c: Include cfgloop.h.
(forward_propagate_addr_expr): Use bb_loop_depth.
* tree-ssa-pre.c (insert_into_preds_of_block): Likewise.
* tree-ssa-sink.c (select_best_block): Likewise.
* ipa-inline-analysis.c: Include cfgloop.h.
(estimate_function_body_sizes): Use bb_loop_depth.
* Makefile.in (tree-ssa-forwprop.o): Depend on $(CFGLOOP_H).
(ipa-inline-analysis.o): Likewise.
(bt-load.o): Likewise.
* gcc.dg/tree-prof/update-loopch.c: Adjust.
From-SVN: r190346
|
|
* basic-block.h (struct edge_def): Use basic_block instead of
basic_block_def *.
* cfgloop.h (struct loop_exit, struct loop): Likewise.
* gengenrtl.c (type_from_format): Likewise. Also for 'tree'
instead of union tree_node *.
* rtl.h (union rtunion_def, emit_insn_before_noloc,
emit_insn_after_noloc, add_insn_before, add_insn_after,
debug_bb_slim): Likewise.
* tree-inline.h (struct copy_body_data): Likewise.
* sched-rgn.c (dump_region_dot): Likewise.
* gimple.h (struct gimple_statement_base, gimple_set_bb,
gsi_move_to_bb_end): Likewise.
* sched-vis.c (debug_bb_slim): Likewise.
(debug_bb_n_slim): Likewise.
* config/mn10300/mn10300.c (mn10300_insert_setlb_lcc): Likewise.
(mn10300_block_contains_call):
From-SVN: r189424
|
|
* cfgloop.h: Do not include rtl.h.
(enum iv_extend_code): New.
(struct rtx_iv): Use iv_extend_code instead of rtx_code.
* Makefile.in (CFGLOOP_H): Do not depend on RTL_H.
* loop-iv.c (iv_extend_to_rtx_code): New function to translate
an IV_EXTEND_CODE to an RTX_CODE.
(dump_iv_info): Update for rtx_iv field type change.
(iv_constant): Likewise.
(iv_subreg): Likewise.
(iv_extend): Likewise.
(iv_neg): Likewise.
(iv_add): Likewise.
(iv_mult): Likewise.
(iv_shift): Likewise.
(get_biv_step_1): Likewise.
(get_biv_step): Likewise.
(iv_analyze_biv): Likewise.
(get_iv_value): Likewise.
(shorten_into_mode): Likewise.
(canonicalize_iv_subregs): Likewise.
* sese.c (sese_build_liveouts): Use MAY_HAVE_DEBUG_STMTS instead
of MAY_HAVE_DEBUG_INSNS.
* tree-ssa-loop-ivopts.c: Include recog.h after expr.h.
* tree-ssa-loop-prefetch.c: Likewise.
From-SVN: r188711
|
|
2012-04-18 Richard Guenther <rguenther@suse.de>
PR tree-optimization/44688
* cfgloop.h (record_niter_bound): Declare.
* tree-ssa-loop-niter.c (record_niter_bound): Export.
Update the estimation with the upper bound here...
(estimate_numbers_of_iterations_loop): ... instead of here.
Do not forcefully reset a recorded upper bound.
* tree-vect-loop-manip.c (vect_do_peeling_for_alignment):
Record the maximum number of loop iterations of the
prologue loop.
From-SVN: r186566
|
|
parameter.
2012-04-18 Richard Guenther <rguenther@suse.de>
* cfgloop.h (estimate_numbers_of_iterations_loop): Remove
use_undefined_p parameter.
* tree-flow.h (estimate_numbers_of_iterations): Likewise.
* tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop):
Likewise.
(estimate_numbers_of_iterations): Likewise.
(estimated_loop_iterations): Adjust.
(max_loop_iterations): Likewise.
(scev_probably_wraps_p): Likewise.
* tree-ssa-loop.c (tree_ssa_loop_bounds): Likewise.
* tree-vrp.c (adjust_range_with_scev): Use max_stmt_executions,
not max_loop_iterations.
(execute_vrp): Remove explicit number of iterations estimation.
From-SVN: r186562
|
|
2012-04-12 Richard Guenther <rguenther@suse.de>
* cfgloop.h (estimated_loop_iterations_int): Ditch
'conservative' parameter.
(max_stmt_executions_int): Likewise.
(estimated_loop_iterations): Likewise.
(max_stmt_executions): Likewise.
(max_loop_iterations): Declare.
(max_loop_iterations_int): Likewise.
(estimated_stmt_executions): Likewise.
(estimated_stmt_executions_int): Likewise.
* tree-ssa-loop-niter.c (estimated_loop_iterations):
Split parts to ...
(max_loop_iterations): ... this.
(estimated_loop_iterations_int): Split parts to ...
(max_loop_iterations_int): ... this.
(max_stmt_executions_int): Split parts to ...
(estimated_stmt_executions_int): ... this.
(max_stmt_executions): Split parts to ...
(estimated_stmt_executions): ... this.
* graphite-sese-to-poly.c (build_loop_iteration_domains): Adjust.
* predict.c (predict_loops): Likewise.
* tree-data-ref.c (max_stmt_executions_tree): Likewise.
(analyze_siv_subscript_cst_affine): Likewise.
(compute_overlap_steps_for_affine_1_2): Likewise.
(analyze_subscript_affine_affine): Likewise.
(init_omega_for_ddr_1): Likewise.
* tree-parloops.c (parallelize_loops): Likewise.
* tree-ssa-loop-ivopts.c (avg_loop_niter): Likewise.
(may_eliminate_iv): Likewise.
* tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Likewise.
(loop_prefetch_arrays): Likewise.
* tree-vrp.c (adjust_range_with_scev): Likewise.
From-SVN: r186372
|
|
2011-06-14 Zdenek Dvorak <ook@ucw.cz>
Tom de Vries <tom@codesourcery.com>
PR target/45098
* cfgloop.h (nb_iterations_upper_bound, nb_iterations_estimate):
Document changed semantics.
(max_stmt_executions, max_stmt_executions_int): Declare.
* tree-data-ref.c (estimated_loop_iterations)
(estimated_loop_iterations_int): Move functions...
* tree-ssa-loop-niter.c (estimated_loop_iterations)
(estimated_loop_iterations_int): here.
(record_estimate): Change nb_iterations_upper_bound and
nb_iterations_estimate semantics.
(max_stmt_executions, max_stmt_executions_int): New function.
* tree-data-ref.c (estimated_loop_iterations_tree): Rename to ...
(max_stmt_executions_tree): this.
(analyze_miv_subscript): Use max_stmt_executions_tree instead of
estimated_loop_iterations_tree.
tree-ssa-loop-ivopts.c (avg_loop_niter): Use
max_stmt_executions_int instead of estimated_loop_iterations_int.
* predict.c (predict_loops): Idem.
* tree-parloops.c (parallelize_loops): Idem.
* tree-data-ref.c (analyze_siv_subscript_cst_affine)
(compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine)
(init_omega_for_ddr_1): Idem.
* tree-ssa-loop-prefetch.c (determine_loop_nest_reuse)
(loop_prefetch_arrays): Idem
* graphite-sese-to-poly.c (build_loop_iteration_domains): Use
max_stmt_executions instead of estimated_loop_iterations.
* tree-data-ref.c (estimated_loop_iterations_tree): Idem.
* tree-vrp.c (adjust_range_with_scev): Use estimated_loop_iterations
instead of nb_iterations_upper_bound.
Co-Authored-By: Tom de Vries <tom@codesourcery.com>
From-SVN: r175022
|
|
with -fsel-sched-pipelining -fselective-scheduling2 -march=core2)
PR target/48273
* cfgloop.h (loop_has_exit_edges): New helper.
* sel-sched-ir.c (init_global_and_expr_for_insn): Make CALLs
non-clonable.
* sel-sched.c (sel_setup_region_sched_flags): Don't pipeline loops
that have no exit edges.
testsuite:
* g++.dg/opt/pr48273.C: New.
From-SVN: r172175
|
|
From-SVN: r168438
|
|
2010-09-01 Richard Guenther <rguenther@suse.de>
* tree-vrp.c (adjust_range_with_scev): Use number of iteration
estimate.
(vrp_visit_phi_node): Delay using SCEV till we balloon the
range.
(execute_vrp): Compute number of iteration estimates.
* cfgloop.h (estimate_numbers_of_iterations_loop): Adjust prototype.
* tree-flow.h (estimate_numbers_of_iterations): Likewise.
* tree-data-ref.c (estimated_loop_iterations): Adjust.
* tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop):
Infer loop bounds from undefined behavior based on a new
parameter.
(estimate_numbers_of_iterations): Likewise.
(scev_probably_wraps_p): Adjust.
* tree-ssa-loop.c (tree_ssa_loop_bounds): Likewise.
* gcc.dg/vect/vect-outer-fir.c: Adjust.
* gcc.dg/tree-ssa/vrp54.c: New testcase.
* gcc.c-torture/execute/20100827-1.c: Likewise.
From-SVN: r163724
|
|
2010-07-20 Vladimir Kargov <kargov@gmail.com>
Sebastian Pop <sebastian.pop@amd.com>
* cfgloop.c (is_loop_exit): Renamed loop_exits_to_bb_p.
(loop_exits_from_bb_p): New.
* cfgloop.h (is_loop_exit): Renamed loop_exits_to_bb_p.
(loop_exits_from_bb_p): Declared.
* graphite-scop-detection.c (scopdet_basic_block_info): Call
loop_exits_to_bb_p.
Co-Authored-By: Sebastian Pop <sebastian.pop@amd.com>
From-SVN: r163153
|
|
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
|
|
gcc/
* Makefile.in (target-globals.o): Depend on $(CFGLOOP_H).
* cfgloop.h (target_cfgloop): New structure.
(default_target_cfgloop): Declare.
(this_target_cfgloop): Declare as a variable or define as a macro.
(target_avail_regs, target_clobbered_regs, target_res_regs)
(target_reg_cost, target_spill_cost): Redefine as macros.
* cfgloopanal.c (default_target_cfgloop): New variable.
(this_target_cfgloop): New conditional variable.
(target_avail_regs, target_clobbered_regs, target_res_regs)
(target_reg_cost, target_spill_cost): Delete.
* target-globals.h (this_target_cfgloop): Declare.
(target_globals): Add a cfgloop field.
(restore_target_globals): Copy the cfgloop field to
this_target_cfgloop.
* target-globals.c: Include cfgloop.h.
(default_target_globals): Initialize the cfgloop field.
(save_target_globals): Likewise.
From-SVN: r162101
|
|
temporary variables)
2010-07-10 Sandra Loosemore <sandra@codesourcery.com>
PR middle-end/42505
gcc/
* tree-inline.c (estimate_num_insns): Refactor builtin complexity
lookup code into....
* builtins.c (is_simple_builtin, is_inexpensive_builtin): ...these
new functions.
* tree.h (is_simple_builtin, is_inexpensive_builtin): Declare.
* cfgloopanal.c (target_clobbered_regs): Define.
(init_set_costs): Initialize target_clobbered_regs.
(estimate_reg_pressure_cost): Add call_p argument. When true,
adjust the number of available registers to exclude the
call-clobbered registers.
* cfgloop.h (target_clobbered_regs): Declare.
(estimate_reg_pressure_cost): Adjust declaration.
* tree-ssa-loop-ivopts.c (struct ivopts_data): Add body_includes_call.
(ivopts_global_cost_for_size): Pass it to estimate_reg_pressure_cost.
(determine_set_costs): Dump target_clobbered_regs.
(loop_body_includes_call): New function.
(tree_ssa_iv_optimize_loop): Use it to initialize new field.
* loop-invariant.c (gain_for_invariant): Adjust arguments to pass
call_p flag through.
(best_gain_for_invariant): Likewise.
(find_invariants_to_move): Likewise.
(move_single_loop_invariants): Likewise, using already-computed
has_call field.
From-SVN: r162043
|
|
2010-05-28 Sebastian Pop <sebastian.pop@amd.com>
* tree-scalar-evolution.c (set_nb_iterations_in_loop): Inlined in the
only place it was called from.
(number_of_latch_executions): Do not return chrec_dont_know when the
may_be_zero is a runtime condition: instead, return a COND_EXPR
including the may_be_zero condition.
* cfgloop.h (struct loop): Add a note on COND_EXPRs to the comment
of nb_iterations.
* tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Handle
COND_EXPRs.
* gcc.dg/vect/vect-outer-fir-lb.c: Un-XFAIL-ed.
From-SVN: r159992
|
|
gcc/ChangeLog:
* coretypes.h (struct simple_bitmap_def, sbitmap, const_sbitmap):
New core types.
* sbitmap.h (struct sbitmap_def): Do not typedef here.
* sbitmap.c: Include sbitmap.h.
* basic-block.h: Do not include bitmap.h, sbitmap.h, partition.h,
hard-reg-set.h. Split everything related to regsets out from here...
* regset.h: ...to here. New file.
* df.h: Include regset.h and sbitmap.h.
* tree-flow.h: Likewise.
* cfgloop.h: Likewise.
* except.h: Do not include sbitmap.h. Include hashtab.h.
* cgraph.h: Include vec.h and function.h.
* reload.h (struct insn_chain): Change types of live_throughout
and dead_or_set from regset_head to bitmap_head.
(compute_use_by_pseudos): Be defined also if regset.h is not included.
* ira-int.h (struct ira_spilled_reg_stack_slot): Change type of
spilled_regs from regset_head to bitmap_head to avoid dependency
in regset.h.
* sel-sched-ir.h: Include regset.h.
* reload.c: Include df.h before reload.h.
* caller-save.c: Likewise.
* reload1.c: Likewise.
* ira.c: Likewise.
(mark_elimination): Update type of r to bitmap, consistent with
DF_LR_IN.
* dominance.c: Include bitmap.h.
* modulo-sched.c: Include df.h.
* cfganal.c: Include bitmap.h and sbitmap.h.
* cfgbuild.c: Include sbitmap.h.
* lcm.c: Include sbitmap.h.
* gcse.c (alloc_gcse_mem): Allocate regset with ALLOC_REG_SET.
* domwalk.c: Include sbitmap.h, exclude ggc.h.
* cfgexpand.c: Inlcude bitmap.h and sbitmap.h.
* cselib.c: Include bitmap.h.
* tree-optimize.c: Include regset.h.
* stmt.c: Include bitmap.h.
* Makefile.in: Update dependencies.
cp/ChangeLog
* semantics.c: Include bitmap.h.
* Make-lang.in: Update dependencies.
From-SVN: r159746
|
|
* cfgloop.h (struct loop): Move can_be_parallel field up.
* ipa-prop.h (struct ip_node_params): Move bitfields up.
* tree-ssa-loop-ivopts.c (struct version_info): Move inv_id field
down.
(struct iv_cand): Convert pos field into a bitfield.
* tree-vectorizer.h (struct _loop_vec_info): Move loop_line_number
field up.
(struct _stmt_vec_info): Shuffle fields for better packing.
From-SVN: r158743
|
|
2009-11-25 H.J. Lu <hongjiu.lu@intel.com>
* alias.c: Remove trailing white spaces.
* alloc-pool.c: Likewise.
* alloc-pool.h: Likewise.
* attribs.c: Likewise.
* auto-inc-dec.c: Likewise.
* basic-block.h: Likewise.
* bb-reorder.c: Likewise.
* bt-load.c: Likewise.
* builtins.c: Likewise.
* builtins.def: Likewise.
* c-common.c: Likewise.
* c-common.h: Likewise.
* c-cppbuiltin.c: Likewise.
* c-decl.c: Likewise.
* c-format.c: Likewise.
* c-lex.c: Likewise.
* c-omp.c: Likewise.
* c-opts.c: Likewise.
* c-parser.c: Likewise.
* c-pretty-print.c: Likewise.
* c-tree.h: Likewise.
* c-typeck.c: Likewise.
* caller-save.c: Likewise.
* calls.c: Likewise.
* cfg.c: Likewise.
* cfganal.c: Likewise.
* cfgexpand.c: Likewise.
* cfghooks.c: Likewise.
* cfghooks.h: Likewise.
* cfglayout.c: Likewise.
* cfgloop.c: Likewise.
* cfgloop.h: Likewise.
* cfgloopmanip.c: Likewise.
* cfgrtl.c: Likewise.
* cgraph.c: Likewise.
* cgraph.h: Likewise.
* cgraphbuild.c: Likewise.
* cgraphunit.c: Likewise.
* cif-code.def: Likewise.
* collect2.c: Likewise.
* combine.c: Likewise.
* convert.c: Likewise.
* coverage.c: Likewise.
* crtstuff.c: Likewise.
* cse.c: Likewise.
* cselib.c: Likewise.
* dbgcnt.c: Likewise.
* dbgcnt.def: Likewise.
* dbgcnt.h: Likewise.
* dbxout.c: Likewise.
* dce.c: Likewise.
* ddg.c: Likewise.
* ddg.h: Likewise.
* defaults.h: Likewise.
* df-byte-scan.c: Likewise.
* df-core.c: Likewise.
* df-problems.c: Likewise.
* df-scan.c: Likewise.
* df.h: Likewise.
* dfp.c: Likewise.
* diagnostic.c: Likewise.
* diagnostic.h: Likewise.
* dominance.c: Likewise.
* domwalk.c: Likewise.
* double-int.c: Likewise.
* double-int.h: Likewise.
* dse.c: Likewise.
* dwarf2asm.c: Likewise.
* dwarf2asm.h: Likewise.
* dwarf2out.c: Likewise.
* ebitmap.c: Likewise.
* ebitmap.h: Likewise.
* emit-rtl.c: Likewise.
* et-forest.c: Likewise.
* except.c: Likewise.
* except.h: Likewise.
* expmed.c: Likewise.
* expr.c: Likewise.
* expr.h: Likewise.
* final.c: Likewise.
* flags.h: Likewise.
* fold-const.c: Likewise.
* function.c: Likewise.
* function.h: Likewise.
* fwprop.c: Likewise.
* gcc.c: Likewise.
* gcov-dump.c: Likewise.
* gcov-io.c: Likewise.
* gcov-io.h: Likewise.
* gcov.c: Likewise.
* gcse.c: Likewise.
* genattr.c: Likewise.
* genattrtab.c: Likewise.
* genautomata.c: Likewise.
* genchecksum.c: Likewise.
* genconfig.c: Likewise.
* genflags.c: Likewise.
* gengtype-parse.c: Likewise.
* gengtype.c: Likewise.
* gengtype.h: Likewise.
* genmddeps.c: Likewise.
* genmodes.c: Likewise.
* genopinit.c: Likewise.
* genpreds.c: Likewise.
* gensupport.c: Likewise.
* ggc-common.c: Likewise.
* ggc-page.c: Likewise.
* ggc-zone.c: Likewise.
* ggc.h: Likewise.
* gimple-iterator.c: Likewise.
* gimple-low.c: Likewise.
* gimple-pretty-print.c: Likewise.
* gimple.c: Likewise.
* gimple.def: Likewise.
* gimple.h: Likewise.
* gimplify.c: Likewise.
* graphds.c: Likewise.
* graphite-clast-to-gimple.c: Likewise.
* gthr-nks.h: Likewise.
* gthr-posix.c: Likewise.
* gthr-posix.h: Likewise.
* gthr-posix95.h: Likewise.
* gthr-single.h: Likewise.
* gthr-tpf.h: Likewise.
* gthr-vxworks.h: Likewise.
* gthr.h: Likewise.
* haifa-sched.c: Likewise.
* hard-reg-set.h: Likewise.
* hooks.c: Likewise.
* hooks.h: Likewise.
* hosthooks.h: Likewise.
* hwint.h: Likewise.
* ifcvt.c: Likewise.
* incpath.c: Likewise.
* init-regs.c: Likewise.
* integrate.c: Likewise.
* ipa-cp.c: Likewise.
* ipa-inline.c: Likewise.
* ipa-prop.c: Likewise.
* ipa-pure-const.c: Likewise.
* ipa-reference.c: Likewise.
* ipa-struct-reorg.c: Likewise.
* ipa-struct-reorg.h: Likewise.
* ipa-type-escape.c: Likewise.
* ipa-type-escape.h: Likewise.
* ipa-utils.c: Likewise.
* ipa-utils.h: Likewise.
* ipa.c: Likewise.
* ira-build.c: Likewise.
* ira-color.c: Likewise.
* ira-conflicts.c: Likewise.
* ira-costs.c: Likewise.
* ira-emit.c: Likewise.
* ira-int.h: Likewise.
* ira-lives.c: Likewise.
* ira.c: Likewise.
* jump.c: Likewise.
* lambda-code.c: Likewise.
* lambda-mat.c: Likewise.
* lambda-trans.c: Likewise.
* lambda.h: Likewise.
* langhooks.c: Likewise.
* lcm.c: Likewise.
* libgcov.c: Likewise.
* lists.c: Likewise.
* loop-doloop.c: Likewise.
* loop-init.c: Likewise.
* loop-invariant.c: Likewise.
* loop-iv.c: Likewise.
* loop-unroll.c: Likewise.
* lower-subreg.c: Likewise.
* lto-cgraph.c: Likewise.
* lto-compress.c: Likewise.
* lto-opts.c: Likewise.
* lto-section-in.c: Likewise.
* lto-section-out.c: Likewise.
* lto-streamer-in.c: Likewise.
* lto-streamer-out.c: Likewise.
* lto-streamer.c: Likewise.
* lto-streamer.h: Likewise.
* lto-symtab.c: Likewise.
* lto-wpa-fixup.c: Likewise.
* matrix-reorg.c: Likewise.
* mcf.c: Likewise.
* mode-switching.c: Likewise.
* modulo-sched.c: Likewise.
* omega.c: Likewise.
* omega.h: Likewise.
* omp-low.c: Likewise.
* optabs.c: Likewise.
* optabs.h: Likewise.
* opts-common.c: Likewise.
* opts.c: Likewise.
* params.def: Likewise.
* params.h: Likewise.
* passes.c: Likewise.
* plugin.c: Likewise.
* postreload-gcse.c: Likewise.
* postreload.c: Likewise.
* predict.c: Likewise.
* predict.def: Likewise.
* pretty-print.c: Likewise.
* pretty-print.h: Likewise.
* print-rtl.c: Likewise.
* print-tree.c: Likewise.
* profile.c: Likewise.
* read-rtl.c: Likewise.
* real.c: Likewise.
* recog.c: Likewise.
* reg-stack.c: Likewise.
* regcprop.c: Likewise.
* reginfo.c: Likewise.
* regmove.c: Likewise.
* regrename.c: Likewise.
* regs.h: Likewise.
* regstat.c: Likewise.
* reload.c: Likewise.
* reload1.c: Likewise.
* resource.c: Likewise.
* rtl.c: Likewise.
* rtl.def: Likewise.
* rtl.h: Likewise.
* rtlanal.c: Likewise.
* sbitmap.c: Likewise.
* sched-deps.c: Likewise.
* sched-ebb.c: Likewise.
* sched-int.h: Likewise.
* sched-rgn.c: Likewise.
* sched-vis.c: Likewise.
* sdbout.c: Likewise.
* sel-sched-dump.c: Likewise.
* sel-sched-dump.h: Likewise.
* sel-sched-ir.c: Likewise.
* sel-sched-ir.h: Likewise.
* sel-sched.c: Likewise.
* sel-sched.h: Likewise.
* sese.c: Likewise.
* sese.h: Likewise.
* simplify-rtx.c: Likewise.
* stack-ptr-mod.c: Likewise.
* stmt.c: Likewise.
* stor-layout.c: Likewise.
* store-motion.c: Likewise.
* stringpool.c: Likewise.
* stub-objc.c: Likewise.
* sync-builtins.def: Likewise.
* target-def.h: Likewise.
* target.h: Likewise.
* targhooks.c: Likewise.
* targhooks.h: Likewise.
* timevar.c: Likewise.
* tlink.c: Likewise.
* toplev.c: Likewise.
* toplev.h: Likewise.
* tracer.c: Likewise.
* tree-affine.c: Likewise.
* tree-affine.h: Likewise.
* tree-browser.def: Likewise.
* tree-call-cdce.c: Likewise.
* tree-cfg.c: Likewise.
* tree-cfgcleanup.c: Likewise.
* tree-chrec.c: Likewise.
* tree-chrec.h: Likewise.
* tree-complex.c: Likewise.
* tree-data-ref.c: Likewise.
* tree-data-ref.h: Likewise.
* tree-dfa.c: Likewise.
* tree-dump.c: Likewise.
* tree-dump.h: Likewise.
* tree-eh.c: Likewise.
* tree-flow-inline.h: Likewise.
* tree-flow.h: Likewise.
* tree-if-conv.c: Likewise.
* tree-inline.c: Likewise.
* tree-into-ssa.c: Likewise.
* tree-loop-distribution.c: Likewise.
* tree-loop-linear.c: Likewise.
* tree-mudflap.c: Likewise.
* tree-nested.c: Likewise.
* tree-nomudflap.c: Likewise.
* tree-nrv.c: Likewise.
* tree-object-size.c: Likewise.
* tree-optimize.c: Likewise.
* tree-outof-ssa.c: Likewise.
* tree-parloops.c: Likewise.
* tree-pass.h: Likewise.
* tree-phinodes.c: Likewise.
* tree-predcom.c: Likewise.
* tree-pretty-print.c: Likewise.
* tree-profile.c: Likewise.
* tree-scalar-evolution.c: Likewise.
* tree-ssa-address.c: Likewise.
* tree-ssa-alias.c: Likewise.
* tree-ssa-ccp.c: Likewise.
* tree-ssa-coalesce.c: Likewise.
* tree-ssa-copy.c: Likewise.
* tree-ssa-copyrename.c: Likewise.
* tree-ssa-dce.c: Likewise.
* tree-ssa-dom.c: Likewise.
* tree-ssa-dse.c: Likewise.
* tree-ssa-forwprop.c: Likewise.
* tree-ssa-ifcombine.c: Likewise.
* tree-ssa-live.c: Likewise.
* tree-ssa-live.h: Likewise.
* tree-ssa-loop-ch.c: Likewise.
* tree-ssa-loop-im.c: Likewise.
* tree-ssa-loop-ivcanon.c: Likewise.
* tree-ssa-loop-ivopts.c: Likewise.
* tree-ssa-loop-manip.c: Likewise.
* tree-ssa-loop-niter.c: Likewise.
* tree-ssa-loop-prefetch.c: Likewise.
* tree-ssa-loop-unswitch.c: Likewise.
* tree-ssa-loop.c: Likewise.
* tree-ssa-math-opts.c: Likewise.
* tree-ssa-operands.c: Likewise.
* tree-ssa-operands.h: Likewise.
* tree-ssa-phiopt.c: Likewise.
* tree-ssa-phiprop.c: Likewise.
* tree-ssa-pre.c: Likewise.
* tree-ssa-propagate.c: Likewise.
* tree-ssa-reassoc.c: Likewise.
* tree-ssa-sccvn.c: Likewise.
* tree-ssa-sink.c: Likewise.
* tree-ssa-structalias.c: Likewise.
* tree-ssa-ter.c: Likewise.
* tree-ssa-threadedge.c: Likewise.
* tree-ssa-threadupdate.c: Likewise.
* tree-ssa-uncprop.c: Likewise.
* tree-ssa.c: Likewise.
* tree-ssanames.c: Likewise.
* tree-switch-conversion.c: Likewise.
* tree-tailcall.c: Likewise.
* tree-vect-data-refs.c: Likewise.
* tree-vect-generic.c: Likewise.
* tree-vect-loop-manip.c: Likewise.
* tree-vect-loop.c: Likewise.
* tree-vect-patterns.c: Likewise.
* tree-vect-slp.c: Likewise.
* tree-vect-stmts.c: Likewise.
* tree-vectorizer.c: Likewise.
* tree-vectorizer.h: Likewise.
* tree-vrp.c: Likewise.
* tree.c: Likewise.
* tree.def: Likewise.
* tree.h: Likewise.
* treestruct.def: Likewise.
* unwind-compat.c: Likewise.
* unwind-dw2-fde-glibc.c: Likewise.
* unwind-dw2.c: Likewise.
* value-prof.c: Likewise.
* value-prof.h: Likewise.
* var-tracking.c: Likewise.
* varasm.c: Likewise.
* varpool.c: Likewise.
* vec.c: Likewise.
* vec.h: Likewise.
* vmsdbgout.c: Likewise.
* web.c: Likewise.
* xcoffout.c: Likewise.
From-SVN: r154645
|
|
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-10-22 Razya Ladelsky <razya@il.ibm.com>
* cfgloopmanip.c (duplicate_subloops): Export.
* tree-parloops.c (loop_parallel_p): Dump if loop is innermost.
(transform_to_exit_first_loop): Duplicate bbs starting from
header up to loop->latch instead of exit->src.
Initialize control variable to the correct number of iterations.
(gather_scalar_reductions): Do not register double reductions.
(parallelize_loops): Dump which loop is tested.
Indicate whether the parallelized loop is inner or not.
Remove the innermost-loop requirement.
* cfgloop.h (duplicate_subloops): Export.
* tree-cfg.c (add_phi_args_after_redirect): New function.
(gimple_duplicate_sese_tail): Remove the no-subloops constraint.
Call duplicate_subloops.
Update number of iterations at the exit condition.
Don't redirect nexits always to the loop exit.
Redirect copied edges from latch to the loop exit.
* testsuite/libgomp.graphite/force-parallel-2.c: Adjust scan.
* testsuite/gcc.dg/autopar/outer-1.c: New testcase.
* testsuite/gcc.dg/autopar/outer-2.c: New testcase.
* testsuite/gcc.dg/autopar/outer-3.c: New testcase.
* testsuite/gcc.dg/autopar/outer-4.c: New testcase.
* testsuite/gcc.dg/autopar/outer-5.c: New testcase.
* testsuite/gcc.dg/autopar/outer-6.c: New testcase.
From-SVN: r153457
|
|
2009-07-30 Sebastian Pop <sebastian.pop@amd.com>
* Makefile.in (OBJS-common): Added dependence on graphite-blocking.o,
graphite-clast-to-gimple.o, graphite-dependences.o,
graphite-interchange.o, graphite-poly.o, graphite-ppl.o,
graphite-scop-detection.o, graphite-sese-to-poly.o, and sese.o.
(graphite-blocking.o,
graphite-clast-to-gimple.o, graphite-dependences.o,
graphite-interchange.o, graphite-poly.o, graphite-ppl.o,
graphite-scop-detection.o, graphite-sese-to-poly.o, and sese.o): New.
* cfgloop.c (alloc_loop): Set loop->can_be_parallel to false.
* cfgloop.h (struct loop): Add can_be_parallel field.
* common.opt (fgraphite-identity): Moved up.
(fgraphite-force-parallel): New flag.
* graphite.c: Rewrite.
* graphite.h: Rewrite.
* passes.c (init_optimization_passes): Schedule a pass of DCE and LIM
after Graphite.
* toplev.c (graphite_out_file): New file descriptor.
(graphite_in_file): New.
(process_options): flag_graphite_force_parallel cannot be used without
Graphite.
* tree-ssa-loop.c: Include toplev.h.
(gate_graphite_transforms): Enable flag_graphite for
flag_graphite_force_parallel.
From-SVN: r150301
|
|
2009-07-30 Sebastian Pop <sebastian.pop@amd.com>
* cfgloop.h (create_empty_loop_on_edge): Pass an extra argument.
* cfgloopmanip.c (create_empty_loop_on_edge): Leave the loop_latch
basic block empty.
From-SVN: r150293
|
|
* cfgloopanal.c (check_irred): Move into ...
(mark_irreducible_loops): ... here; return true if ireducible
loops was found.
* ipa-pure-const.c: Include cfgloop.h and tree-scalar-evolution.h
(analyze_function): Try to prove loop finiteness.
* cfgloop.h (mark_irreducible_loops): Update prototype.
* Makefile.in (ipa-pure-const.o): Add dependency on SCEV and CFGLOOP.
From-SVN: r149101
|
|
looping_previously_known...
* ipa-pure-const.c (struct funct_state_d): New fields
state_previously_known, looping_previously_known; remove
state_set_in_source.
(analyze_function): Use new fields.
(propagate): Avoid assumption that state_set_in_source imply
nonlooping.
* tree-ssa-loop-niter.c (finite_loop_p): New function.
* tree-ssa-loop-ivcanon.c (empty_loop_p): Use it.
* cfgloop.h (finite_loop_p): Declare.
From-SVN: r146821
|
|
2009-04-21 Taras Glek <tglek@mozilla.com>
* include/hashtab.h: Update GTY annotations to new syntax
* include/splay-tree.h: Likewise
gcc/ChangeLog
2009-04-21 Taras Glek <tglek@mozilla.com>
* alias.c: Update GTY annotations to new syntax
* basic-block.h: Likewise
* bitmap.h: Likewise
* c-common.h: Likewise
* c-decl.c: Likewise
* c-parser.c: Likewise
* c-pragma.c: Likewise
* c-tree.h: Likewise
* cfgloop.h: Likewise
* cgraph.h: Likewise
* config/alpha/alpha.c: Likewise
* config/arm/arm.h: Likewise
* config/avr/avr.h: Likewise
* config/bfin/bfin.c: Likewise
* config/cris/cris.c: Likewise
* config/darwin.c: Likewise
* config/frv/frv.c: Likewise
* config/i386/i386.c: Likewise
* config/i386/i386.h: Likewise
* config/i386/winnt.c: Likewise
* config/ia64/ia64.h: Likewise
* config/iq2000/iq2000.c: Likewise
* config/mips/mips.c: Likewise
* config/mmix/mmix.h: Likewise
* config/pa/pa.c: Likewise
* config/pa/pa.h: Likewise
* config/rs6000/rs6000.c: Likewise
* config/s390/s390.c: Likewise
* config/sparc/sparc.c: Likewise
* config/xtensa/xtensa.c: Likewise
* cselib.h: Likewise
* dbxout.c: Likewise
* dwarf2out.c: Likewise
* except.c: Likewise
* except.h: Likewise
* fixed-value.h: Likewise
* function.c: Likewise
* function.h: Likewise
* gimple.h: Likewise
* integrate.c: Likewise
* optabs.c: Likewise
* output.h: Likewise
* real.h: Likewise
* rtl.h: Likewise
* stringpool.c: Likewise
* tree-data-ref.c: Likewise
* tree-flow.h: Likewise
* tree-scalar-evolution.c: Likewise
* tree-ssa-address.c: Likewise
* tree-ssa-alias.h: Likewise
* tree-ssa-operands.h: Likewise
* tree.c: Likewise
* tree.h: Likewise
* varasm.c: Likewise
* varray.h: Likewise
* vec.h: Likewise
* coretypes.h: Do not define GTY macro if it is already defined
* doc/gty.texi: Update GTY documentation to new syntax
* gengtype-lex.l: Enforce attribute-like syntax for GTY annotations on structs
* gengtype-parse.c: Likewise
gcc/ada/ChangeLog
2009-04-21 Taras Glek <tglek@mozilla.com>
* gcc-interface/ada-tree.h: Update GTY annotations to new syntax
* gcc-interface/trans.c: Likewise
* gcc-interface/utils.c: Likewise
gcc/cp/ChangeLog
2009-04-21 Taras Glek <tglek@mozilla.com>
* cp-tree.h: Update GTY annotations to new syntax
* decl.c: Likewise
* mangle.c: Likewise
* name-lookup.c: Likewise
* name-lookup.h: Likewise
* parser.c: Likewise
* pt.c: Likewise
* rtti.c: Likewise
* semantics.c: Likewise
* typeck2.c: Likewise
gcc/fortran/ChangeLog
2009-04-21 Taras Glek <tglek@mozilla.com>
* f95-lang.c: Update GTY annotations to new syntax
* trans-intrinsic.c: Likewise
* trans-io.c: Likewise
* trans.h: Likewise
gcc/java/ChangeLog
2009-04-21 Taras Glek <tglek@mozilla.com>
* builtins.c: Update GTY annotations to new syntax
* decl.c: Likewise
* java-tree.h: Likewise
* jcf.h: Likewise
* lang.c: Likewise
gcc/objc/ChangeLog
2009-04-21 Taras Glek <tglek@mozilla.com>
* objc-act.c: Update GTY annotations to new syntax
* objc-act.h: Likewise
libcpp/ChangeLog
2009-04-21 Taras Glek <tglek@mozilla.com>
* include/cpp-id-data.h: Update GTY annotations to new syntax
* include/cpplib.h: Likewise
* include/line-map.h: Likewise
* include/symtab.h: Likewise
From-SVN: r146607
|