aboutsummaryrefslogtreecommitdiff
path: root/gcc/coverage.h
AgeCommit message (Collapse)AuthorFilesLines
2003-10-20toplev.c (rest_of_compilation): Fix webizer pass ordering.Jan Hubicka1-0/+1
* toplev.c (rest_of_compilation): Fix webizer pass ordering. * cgraphunit.c (decide_is_function_needed): Fix test dealing with functions implicitly made inline. * cgraphunit.c (cgraph_decide_inlining_incrementally): New function. (cgraph_finalize_function): Use it. (cgraph_mark_inline): Allow incrmental decisions * invoke.texi (max-inline-slope, min-inline-insns): Kill. * params.def (PARAM_MAX_INLINE_SLOPE, PARAM_MIN_INLINE_INSNS): Kill. * tree-inline.c (limits_allow_inlining): Kill. (expand_call_inline): Always use unit-at-a-time path. * decl.c (start_cleanup_fn): Set DECL_DECLARED_INLINE_P to deffer the expansion. * testsuite/g++.dg/opt/inline4.C: Do not use min-inline-insns parameter. * testsuite/gcc.dg/inline-2.c: Likewise. From-SVN: r72721
2003-05-11coverage.h (coverage_counter_alloc): New function.Nathan Sidwell1-0/+11
* coverage.h (coverage_counter_alloc): New function. * function.h (struct function): Remove arc_profile flag. * coverage.c (fn_ident): Remove. (fn_b_ctrs, no_coverage): New. (get_coverage_counts): Use current_function_funcdef_no. (coverage_counter_alloc): New. (coverage_counter_ref): Adjust. (coverage_begin_output): Check no_coverage. Use current_function_funcdef_no. (coverage_end_function): Likewise. (create_coverage): Set no_coverage. Set DECL_UNINLINEABLE rather than clearing flag_inline_functions. Do not clear arc_profile flag. * function.c (prepare_function_start): Do not set arc_profile flag. * profile.c (instrument_edges): Return number of instrumented edges. Use a for loop. (branch_prob): Call coverage_counter_alloc. Make BB_TO_GCOV_INDEX local to here and simplify. Use profile_arc_flag not arc_profile flag. (find_spanning_tree): Reformat. * toplev.c (rest_of_compilation): Use profile_arc_flags and flag_test_coverage rather than arc_profile flag. From-SVN: r66695
2003-04-23Makefile.in (LIBGCC_DEPS): Add gcov headers.Nathan Sidwell1-40/+4
* Makefile.in (LIBGCC_DEPS): Add gcov headers. (libgcov.a): Depends on LIBGCC_DEPS. * basic-block.h (profile_info): Moved here from coverage.h. Made a pointer. * coverage.c (struct function_list): Fixed array of counter types. (struct counts_entry): Keyed by counter type, contains summary. (profile_info): Moved to profile.c. (prg_ctr_mask, prg_n_ctrs, fn_ctr_mask, fn_n_ctrs): New global vars. (profiler_label): Remove. (ctr_labels): New. (set_purpose, label_for_tag, build_counter_section_fields, build_counter_section_value, build_counter_section_data_fields, build_counter_section_data_values, build_function_info_fields, build_function_info_value, gcov_info_fields, gcov_info_value): Remove. (build_fn_info_type, build_fn_info_value, build_ctr_info_type, build_ctr_info_value, build_gcov_info): New. (htab_counts_entry_hash, htab_counts_entry_eq): Adjust. (reads_counts_file): Adjust. (get_coverage_counts): Takes counter number. Add summary parameter. Adjust. (coverage_counter_ref): Tkaes counter number. Adjust. Lazily create counter array labels. (coverage_end_function): Adjust. (create_coverage): Adjust. (find_counters_section): Remove. * coverage.h (MAX_COUNTER_SECTIONS): Remove. (struct section_info, struct profile_info): Remove. (profile_info): Moved to basic-block.h. (coverage_counter_ref): Takes a counter number. (get_coverage_counts): Takes a counter number. Added summary parameter. (find_counters_section): Remove. * gcov-dump.c (tag_arc_counts): Rename to ... (tag_counters): ... here. Adjust. (tag_table): Move tag_counters to 3rd entry. Remove PROGRAM_PLACEHOLDER and PROGRAM_INCORRECT entries. (dump_file): Check for counter tag values here. (tag_summary): Adjust. * gcov-io.c (gcov_write_summary, gcov_read_summary): Adjust. * gcov-io.h (GCOV_LOCKED): New. (GCOV_TAG_ARC_COUNTS): Rename to ... (GCOV_TAG_COUNTS_BASE): ... here. (GCOV_TAG_PLACEHOLDER_SUMMARY, GCOV_TAG_INCORRECT_SUMMARY): Remove. (GCOV_COUNTER_ARCS, GCOV_COUNTERS, GCOV_NAMES): New. (GCOV_TAG_FOR_COUNTER, GCOV_COUNTER_FOR_TAG, GCOV_TAG_IS_COUNTER): New. (struct gcov_ctr_summary): New. (struct gcov_summary): Adjust. (struct gcov_counter_section): Remove. struct gcov_counter_section_data): Remove. (struct gcov_function_info): Rename to ... (struct gcov_fn_info): ... here. Adjust. (struct gcov_ctr_info): New. (struct gcov_info): Adjust. * gcov.c (read_count_file): Adjust. (output_lines): Adjust. * libgcov.c (gcov_exit): Adjust. (__gcov_flush): Adjust. * mklibgcc.in (libgcc2_c_dep): Add gcov headers. * predict.c (maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p, compute_frequency_function): Adjust profile_info use. * profile.c (struct counts_entry): Remove. (profile_info): Define here. (get_exec_counts): Adjust get_coverage_counts call. (compute_branch_probablilities): Remove find_counters_section call. (gen_edge_profiler): Adjust coverage_counter_ref call. * tracer.c (tail_duplicate): Adjust profile_info use. From-SVN: r65990
2003-04-21Break out coverage routines to new file.Nathan Sidwell1-0/+72
* Makefile.in (COVERAGE_H): New variable (C_OBJS): Add coverage.o (coverage.o): New target. (profile.o, loop-init.o, sched-ebb.o, predict.o, tracer.o): Adjust dependencies. (GTFILES): Adjust. (gt-coverage.h): New target. (gt-profile.h): Remove. * profile.h: Remove. Move to ... * coverage.h: ... here. New. #include gcov-io.h. * gcov-io.h: Move function definitions to ... * gcov-io.c: ... here. New. * profile.c: Move coverage routines to coverage.c. (instrument_edges, get_exec_counts, branch_prob, init_branch_prob, end_branch_prob): Adjust. * coverage.c: New. Coverage routines from profile.c (coverage_counter_ref, coverage_init, coverage_finish, coverage_end_function, coverage_begin_output, coverage_counter_ref, get_coverage_counts): Define. * gcov-dump.c, gcov.c: #include gcov-io.c. * libgcov.c: Likewise. Adjust. * loop-init.c: Don't #include profile.h * tracer.c, predict.c, sched-ebb.c: Adjust #includes. * rtl.h: Add coverage prototypes. * toplev.c (compile_file): Init coverage, not branch_prob. Always call coverage_finish. (rest_of_compilation): Call coverage_end_function. From-SVN: r65897