aboutsummaryrefslogtreecommitdiff
path: root/gcc/fibonacci_heap.h
AgeCommit message (Collapse)AuthorFilesLines
2018-01-03Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r256169
2017-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r243994
2016-07-20Add selftests for fibonacci_heapMartin Liska1-9/+28
* Makefile.in: Include fibonacci_heap.c * fibonacci_heap.c: New file. * fibonacci_heap.h (fibonacci_heap::insert): Use insert_node. (fibonacci_heap::union_with): Fix deletion of the second heap. * selftest-run-tests.c (selftest::run_tests): Incorporate fibonacci heap tests. * selftest.h: Declare fibonacci_heap_c_tests. From-SVN: r238509
2016-01-04Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r232055
2015-05-19Use std::swap instead of explicit swapsMikhail Maltsev1-4/+2
gcc/ * bb-reorder.c (fix_up_fall_thru_edges): Use std::swap instead of explicit swaps. * dojump.c (do_compare_rtx_and_jump): Likewise. * expmed.c (emit_store_flag_1): Likewise. * fibonacci_heap.h (fibonacci_heap::union_with): Likewise. * final.c (sprint_ul): Use std::reverse for reversing a string. * fold-const.c (extract_muldiv_1): Use std::swap. * genmodes.c (emit_mode_int_n): Likewise. * ifcvt.c (dead_or_predicable): Likewise. * ira-build.c (ira_merge_live_ranges): Likewise. (swap_allocno_copy_ends_if_necessary): Likewise. * ira.c (ira_setup_alts): Likewise. * loop-iv.c (iv_analyze_expr): Likewise. (implies_p): Likewise. (canon_condition): Likewise. * lra-constraints.c (swap_operands): Likewise. * lra-lives.c (lra_merge_live_ranges): Likewise. * omega.c (swap): Remove. (bswap): Remove. (omega_unprotect_1): Use std::swap. (omega_solve_geq): Likewise. * optabs.c (expand_binop_directly): Likewise. (expand_binop): Likewise. (emit_conditional_move): Likewise. (emit_conditional_add): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * reg-stack.c (emit_swap_insn): Likewise. (swap_to_top): Likewise. (compare_for_stack_reg): Likewise. (subst_asm_stack_regs): Likewise. * reload.c (find_reloads): Likewise. * reload1.c (gen_reload_chain_without_interm_reg_p): Likewise. * sel-sched.c (invoke_reorder_hooks): Likewise. (create_block_for_bookkeeping): Likewise. * tree-data-ref.c (lambda_matrix_row_exchange): Remove. (lambda_matrix_right_hermite): Use std::swap. * tree-ssa-coalesce.c (sort_coalesce_list): Likewise. * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise. * tree-ssa-loop-ivopts.c (iv_ca_delta_reverse): Likewise. * tree-ssa-math-opts.c (is_widening_mult_p): Likewise. * tree-ssa-phiopt.c (hoist_adjacent_loads): Likewise. * tree-ssa-reassoc.c (linearize_expr_tree): Likewise. * tree-ssa-threadedge.c (simplify_control_stmt_condition): Likewise. * tree-vrp.c (compare_ranges): Likewise. * var-tracking.c (add_with_sets): Likewise. (vt_find_locations): Likewise. gcc/c/ * c-typeck.c (build_array_ref): Use std::swap instead of explicit swaps gcc/cp/ * typeck.c (composite_pointer_type): Use std::swap instead of explicit swaps. gcc/c-family/ * c-common.c (shorten_compare): Use std::swap instead of explicit swaps. gcc/fortran/ * interface.c (compare_actual_formal): Use std::swap instead of explicit swaps. * trans-array.c (gfc_trans_scalarized_loop_end): Likewise. * trans-intrinsic.c (walk_inline_intrinsic_transpose): Likewise. From-SVN: r223332
2015-01-05Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r219188
2014-12-16* fibonacci_heap.h (min): Return m_data instead of non-existing data.Jan Hubicka1-1/+1
From-SVN: r218797
2014-11-24re PR lto/63968 (175.vpr from cpu2000 fails to build with LTO)Martin Liska1-17/+43
PR lto/63968 * bb-reorder.c (find_traces_1_round): decreate_key is replaced with replace_key method. * fibonacci_heap.h (fibonacci_heap::insert): New argument. (fibonacci_heap::replace_key_data): Likewise. (fibonacci_heap::replace_key): New method that can even increment key, this operation costs O(log N). (fibonacci_heap::extract_min): New argument. (fibonacci_heap::delete_node): Likewise. From-SVN: r218006
2014-11-18New template fibonacci_heap class introduced.Martin Liska1-0/+608
* fibonacci_heap.h: New file. (fibonacci_heap::insert): Created from fibheap_insert. (fibonacci_heap::empty): Created from fibheap_empty. (fibonacci_heap::nodes): Created from fibheap_nodes. (fibonacci_heap::min_key): Created from fibheap_min_key. (fibonacci_heap::decrease_key): Created from fibheap_replace_key. (fibonacci_heap::replace_key_data): Created from fibheap_replace_key_data. (fibonacci_heap::extract_min): Created from fibheap_extract_min. (fibonacci_heap::min): Created from fibheap_min. (fibonacci_heap::replace_data): Created from fibheap_replace_data. (fibonacci_heap::delete_node): Created from fibheap_delete_node. (fibonacci_heap::union_with): Created from fibheap_union. * ipa-inline.c (update_edge_key): New heap API is used. (update_caller_keys): Likewise. (update_callee_keys): Likewise. (lookup_recursive_calls): Likewise. (recursive_inlining): Likewise. (add_new_edges_to_heap): Likewise. (heap_edge_removal_hook): Likewise. (inline_small_functions): Likewise. From-SVN: r217720