[PATCH 2/4] Implement N disk counters for single value and indirect call counters.

2019-06-04 Thread marxin
gcc/ChangeLog: 2019-06-04 Martin Liska * gcov-io.h (GCOV_DISK_SINGLE_VALUES): New. (GCOV_SINGLE_VALUE_COUNTERS): Likewise. * ipa-profile.c (ipa_profile_generate_summary): Use get_most_common_single_value. * tree-profile.c (gimple_init_gcov_profiler):

[PATCH 1/4] Remove indirect call top N counter type.

2019-06-04 Thread marxin
gcc/ChangeLog: 2019-06-04 Martin Liska * doc/invoke.texi: Remove param. * gcov-counter.def (GCOV_COUNTER_ICALL_TOPNV): Remove. * gcov-io.h (GCOV_ICALL_TOPN_VAL): Likewise. (GCOV_ICALL_TOPN_NCOUNTS): Likewise. * params.def (PARAM_INDIR_CALL_TOPN_

[PATCH 3/4] Dump histograms only if present.

2019-06-04 Thread marxin
gcc/ChangeLog: 2019-06-04 Martin Liska * value-prof.c (dump_histogram_value): Print histogram values only if present. --- gcc/value-prof.c | 72 +++- 1 file changed, 28 insertions(+), 44 deletions(-) diff --git a/gcc/value-prof.c b

[PATCH 4/4] Update a bit dump format.

2019-06-04 Thread marxin
gcc/ChangeLog: 2019-06-04 Martin Liska * value-prof.c (dump_histogram_value): Change dump format. (gimple_mod_subtract_transform): Remove legacy comment. --- gcc/value-prof.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/gcc/value-prof.c

[PATCH 0/3] Fix linemap assertation connected to PR preprocessor/90382.

2019-05-14 Thread marxin
ch. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready for trunk? Thanks, Martin marxin (2): Do a refactoring in linemap (PR preprocessor/90382). Fix min_location usage in line-map.c (PR preprocessor/90382). paolo (1): /cp 2018-05-14 Paolo Carlini gcc

[PATCH 2/3] Fix min_location usage in line-map.c (PR preprocessor/90382).

2019-05-14 Thread marxin
libcpp/ChangeLog: 2019-05-13 Martin Liska PR preprocessor/90382 * line-map.c (first_map_in_common_1): Handle ADHOC locations. --- libcpp/line-map.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libcpp/line-map.c b/libcpp/line-map.c index

[PATCH 1/3] Do a refactoring in linemap (PR preprocessor/90382).

2019-05-14 Thread marxin
libcpp/ChangeLog: 2019-05-13 Martin Liska PR preprocessor/90382 * include/line-map.h (get_data_from_adhoc_loc): Add const to the first argument. (get_location_from_adhoc_loc): Likewise. * line-map.c(get_data_from_adhoc_loc): Add const to the fi

[PATCH 1/2] Test for not existence of a negative loop (PR gcov-profile/90380).

2019-05-09 Thread marxin
gcc/ChangeLog: 2019-05-09 Martin Liska PR gcov-profile/90380 * gcov.c (enum loop_type): Remove the enum and the operator. (handle_cycle): Assert that we should not reach a negative count. (circuit): Use loop_found instead of a tri-state loop_typ

[PATCH 2/2] Do not follow zero edges in cycle detection (PR gcov-profile/90380).

2019-05-09 Thread marxin
gcc/ChangeLog: 2019-05-09 Martin Liska * gcov.c (circuit): Ignore zero count arcs. --- gcc/gcov.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gcc/gcov.c b/gcc/gcov.c index 6bcd2b23748..f409d67e12c 100644 --- a/gcc/gcov.c +++ b/gcc/gcov.c @@ -742,7 +742

[PATCH 0/2] gcov for huge cyclic graph (PR gcov-profile/90380)

2019-05-09 Thread marxin
detection algorithm should not use zero edges. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. I'll install it if there will be no objections. Martin marxin (2): Test for not existence of a negative loop (PR gcov-profile/90380). Do not follow zero edges in cycle d

[PATCH 2/3] Do not use full qualified names if possible.

2019-04-29 Thread marxin
gcc/ChangeLog: 2019-04-29 Martin Liska * profile-count.h: Do not use full qualified names if possible. * profile-count.c (profile_count::to_frequency): Likewise. --- gcc/profile-count.c | 15 ++--- gcc/profile-count.h | 155 ++-

[PATCH 1/3] Use cappital letters for enum value names.

2019-04-29 Thread marxin
gcc/ChangeLog: 2019-04-29 Martin Liska * profile-count.h (enum profile_quality): Use cappital letters for enum value names. Use the adjusted names. * profile-count.c: Use the adjusted names. --- gcc/profile-count.c | 38 +++ gcc/profile-count.h | 114 +++

[PATCH 0/3] Small clean up of profile_{count,probability}

2019-04-29 Thread marxin
fully qualified names. 3) I added vertical spaces to separate different functions (operators). Survives bootstrap and tests on x86_64-linux-gnu. Ready for trunk after 9.1 release? Thanks, Martin marxin (3): Use cappital letters for enum value names. Do not use full qualified names if possible.

[PATCH 3/3] Add vertical spacing in order to separate functions.

2019-04-29 Thread marxin
gcc/ChangeLog: 2019-04-29 Martin Liska * profile-count.c: Add vertical spacing in order to separate functions. * profile-count.h: Likewise. --- gcc/profile-count.c | 25 +++--- gcc/profile-count.h | 51 +++-- 2 f

[PATCH 2/3] Extend format of -fdbg-cnt: add aux_base filter.

2019-03-27 Thread marxin
gcc/ChangeLog: 2019-03-27 Martin Liska * dbgcnt.c (dbg_cnt_set_limit_by_name): Add new argument aux_base and filter based on aux_base_name. (dbg_cnt_process_single_pair): Parse aux_base. * doc/invoke.texi: Document new extended format. gcc/testsuite/ChangeLog:

[PATCH 1/3] Fix multiple values for -fdbg-cnt.

2019-03-27 Thread marxin
gcc/ChangeLog: 2019-03-27 Martin Liska * dbgcnt.c (dbg_cnt_process_single_pair): Fix GNU coding style. (dbg_cnt_process_opt): Parse first tokens aas dbg_cnt_process_single_pair is also using strtok. --- gcc/dbgcnt.c | 25 +++-- 1 file changed, 15 i

[PATCH 3/3] Dump -fdbg-cnt limit reach also to stderr stream.

2019-03-27 Thread marxin
gcc/ChangeLog: 2019-03-27 Martin Liska * dbgcnt.c (print_limit_reach): New function. (dbg_cnt): Use it. --- gcc/dbgcnt.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/gcc/dbgcnt.c b/gcc/dbgcnt.c index 5a7c9a8bf6e..cfa03d611ee

[PATCH 0/3] Fix and improve -fdbg-cnt option.

2019-03-27 Thread marxin
ension of the option to filter aux_base_name. I've been testing the series right now. Thoughts? Thanks, Martin marxin (3): Fix multiple values for -fdbg-cnt. Extend format of -fdbg-cnt: add aux_base filter. Dump -fdbg-cnt limit reach also to stderr stream. gcc/dbgcnt.c

[PATCH 3/3] Fix GNU coding style in lto-common.c.

2019-03-14 Thread marxin
gcc/lto/ChangeLog: 2019-03-14 Martin Liska * lto-common.c: Update coding style. * lto.c (materialize_cgraph): Likewise. --- gcc/lto/lto-common.c | 214 ++- gcc/lto/lto.c| 30 +++--- 2 files changed, 128 insertions(+), 116 delet

[PATCH 2/3] Add lto-dump tool.

2019-03-14 Thread marxin
gcc/ChangeLog: 2019-03-14 Hrishikesh Kulkarni Martin Liska * Makefile.in: Add lto-dump.texi. * cgraph.h: Add new functions dump_visibility and dump_type_name. * doc/gcc.texi: Include lto-dump section. * doc/lto-dump.texi: New file.

[PATCH 0/3][stage1] [PATCH v2] LTO dump tool

2019-03-14 Thread marxin
t GNU coding style fixes. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed after stage1 opens? Thanks, Martin marxin (3): Split part of functionality from lto.c to lto-common.c. Add lto-dump tool. Fix GNU coding style in lto-common.c. gcc/Makefi

[PATCH 0/4] Enhance and fix various issues in -fmem-report

2018-11-05 Thread marxin
Hi. As I discussed with Richi, the patch set fixes few issues in memory report. Apart from that it makes it more readable with usage of k (or M) as units. Survives bootstrap and regression tests on x86_64-linux-gnu. And there are no new warnings on i586-linux-gnu. Martin marxin (4): Fix

[PATCH 2/4] Fix GNU coding style.

2018-11-05 Thread marxin
gcc/ChangeLog: 2018-11-02 Martin Liska * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding style. * vec.c: Likewise. --- gcc/mem-stats.h | 61 + gcc/vec.c | 1 - 2 files changed, 26 insertions(+), 36 d

[PATCH 3/4] Fix vector memory statistics.

2018-11-05 Thread marxin
gcc/ChangeLog: 2018-11-02 Martin Liska * mem-stats.h (mem_alloc_description::release_instance_overhead): Return T *. * vec.c (struct vec_usage): Register m_element_size. (vec_prefix::register_overhead): New arguments: elements and element_size.

[PATCH 1/4] Fix string pool statistics.

2018-11-05 Thread marxin
libcpp/ChangeLog: 2018-11-02 Martin Liska * include/symtab.h (ht_identifier): Make room for ggc flag. * symtab.c (ht_lookup_with_hash): Mark GGC and non-GGC allocated strings. (ht_dump_statistics): Use the information. --- libcpp/include/symtab.h | 4

[PATCH 4/4] Come up with SIZE_AMOUNT and use it in memory statistics and sort stats.

2018-11-05 Thread marxin
gcc/ChangeLog: 2018-11-02 Martin Liska * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT. * bitmap.h (struct bitmap_usage): Likewise. * ggc-common.c (SCALE): Remove. (LABEL): Likewise. (struct ggc_usage): Use SIZE_AMOUNT. And update compare me

[PATCH 6/7] Adjust asan_shadow_offset for powerpc64 targets.

2018-10-25 Thread marxin
gcc/ChangeLog: 2018-10-25 Martin Liska * config/powerpcspe/powerpcspe.c (rs6000_asan_shadow_offset): Aligh with value changed in libsanitizer/asan/asan_mapping.h. * config/rs6000/rs6000.c (rs6000_asan_shadow_offset): Likewise. --- gcc/config/powerpcspe/powerpc

[PATCH 5/7] New local GCC patch for CAN_SANITIZE_UB ifdef.

2018-10-25 Thread marxin
libsanitizer/ChangeLog: 2018-10-24 Martin Liska * ubsan/ubsan_platform.h: Add ifndef as we define it with -DCAN_SANITIZE_UB CFLAGS. --- libsanitizer/ubsan/ubsan_platform.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libsanitizer/ubsan/ubsan_platform.h b/libsanitizer

[PATCH 7/7] Update test-suite expected output after rewording in libsanitizer.

2018-10-25 Thread marxin
gcc/testsuite/ChangeLog: 2018-10-24 Martin Liska * c-c++-common/ubsan/pr63839.c: Update to new sanitizer message. * c-c++-common/ubsan/unreachable-1.c (main): Likewise. * c-c++-common/ubsan/unreachable-2.c: Likewise. * c-c++-common/ubsan/unreachable-4.c (main):

[PATCH 1/7] Update merge script and HOWTO_MERGE documentation.

2018-10-25 Thread marxin
libsanitizer/ChangeLog: 2018-10-24 Martin Liska * HOWTO_MERGE: Enhance documentation. * merge.sh: Add support for git as well. --- libsanitizer/HOWTO_MERGE | 9 ++--- libsanitizer/merge.sh| 6 -- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/libs

[PATCH 3/7] Update build system: include new files and run autoheader, autoconf, automake

2018-10-25 Thread marxin
libsanitizer/ChangeLog: 2018-10-24 Martin Liska * config.h.in: Regenerate. * configure: Likewise. * sanitizer_common/Makefile.am: Include new files, remove old files. * sanitizer_common/Makefile.in: Regenerate. * ubsan/Makefile.am: Include new f

[PATCH 0/7] libsanitizer: merge from trunk

2018-10-25 Thread marxin
e Function symbols changes summary: 1 Removed, 0 Added function symbol not referenced by debug info Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info And for libasan with current LLVM top: $ abidiff /home/marxin/BIG/Programming/llvm/objdir/lib/clang

[PATCH 4/7] Apply LOCAL_PATCHES and remove not used ones.

2018-10-25 Thread marxin
libsanitizer/ChangeLog: 2018-10-24 Martin Liska * LOCAL_PATCHES: Update patch list. * asan/asan_globals.cc (CheckODRViolationViaIndicator): Apply patches from GCC's trunk. (CheckODRViolationViaPoisoning): Likewise. (RegisterGlobal): Likewise. *

[PATCH 1/4] Add filter-rtags-warnings.py script.

2018-09-24 Thread marxin
contrib/ChangeLog: 2018-09-24 Martin Liska * filter-rtags-warnings.py: New file. --- contrib/filter-rtags-warnings.py | 71 1 file changed, 71 insertions(+) create mode 100755 contrib/filter-rtags-warnings.py diff --git a/contrib/filter-rtags-warnin

[PATCH 3/4] Fix small coding style issues (PR fortran/87394).

2018-09-24 Thread marxin
gcc/ChangeLog: 2018-09-24 Martin Liska PR fortran/87394 * dbgcnt.c (dbg_cnt_process_single_pair): Return false instead of NULL. * dumpfile.c (dump_enable_all): Remove extra parenthesis. * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.

[PATCH 4/4] Fix scaling of a sreal number.

2018-09-24 Thread marxin
6 = ~_65; if (_66 != 0) goto ; [INV] else goto ; [INV] : fancy_abort ("/home/marxin/Programming/gcc/gcc/ipa-fnsummary.c", 2745, &__FUNCTION__); which confirms the warning. gcc/ChangeLog: 2018-09-23 Martin Liska * ipa-fnsummary.c (estimate_node_size_and_time): Scale

[PATCH 2/4] Remove unused functions and fields.

2018-09-24 Thread marxin
gcc/ChangeLog: 2018-09-24 Martin Liska * alias.c (set_dest_equal_p): Remove unused function. * config/i386/i386.c (def_builtin_pure2): Likewise. * diagnostic-show-locus.c (class layout): Remove unused field. (layout::layout): Likewise here. * du

[PATCH 0/4] Clean-up warnings spotted by Rtags

2018-09-24 Thread marxin
stall my Python script that filters the warnings and few patches that address the relevant warnings seen. Patch survives bootstrap and regression tests on ppc64le-linux-gnu machine. Martin marxin (4): Add filter-rtags-warnings.py script. Remove unused functions and fields. Fix small coding

[PATCH 0/3] Improvements to switch expansion code

2018-08-14 Thread marxin
Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. marxin (3): Fix probabilities for jump table (PR tree-optimization/86702). Fix probability for bit-tests. Improve switch code emission for a balanced tree (PR tree-optimization/86847). gcc/testsuite/gcc.dg/tree-

[PATCH 1/3] Fix probabilities for jump table (PR tree-optimization/86702).

2018-08-14 Thread marxin
The patch set even probability to jump tables based on number of cases which are handled on each edge. gcc/ChangeLog: 2018-08-06 Martin Liska PR tree-optimization/86702 * tree-switch-conversion.c (jump_table_cluster::emit): Make probabilities even for values in jump ta

[PATCH 3/3] Improve switch code emission for a balanced tree (PR tree-optimization/86847).

2018-08-14 Thread marxin
This is the most complex patch. It follows original implementation and does following improvements that were part of original code: a) for a node with both children (that don't have children) and only single case values handled: emit series of 3 compares and jump to default b) for a node with only

[PATCH 2/3] Fix probability for bit-tests.

2018-08-14 Thread marxin
The patch set even probability to bit test based on number of cases which are handled on each edge. gcc/ChangeLog: 2018-08-06 Martin Liska * tree-switch-conversion.c (bit_test_cluster::find_bit_tests): Add new argument to bit_test_cluster constructor. (bit_test_cluster

[PATCH 0/4] Alignment option enhancements

2018-07-16 Thread marxin
values. I tested that on x86_64-linux-gnu and ppc64le-linux. And also I tested all targets that I touched, these should provide equal results. Martin marxin (4): Clean up of new format of -falign-FOO. Fix coding style of ASM_OUTPUT_ALIGN. Define MAX_CODE_ALIGN globally. Do not enable OP

[PATCH 4/4] Do not enable OPT_falign_* for -Os.

2018-07-16 Thread marxin
gcc/ChangeLog: 2018-07-12 Martin Liska * opts.c: Do not enable OPT_falign_* for -Os. --- gcc/opts.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/opts.c b/gcc/opts.c index 0625b15b27b..b8ae8756b4f 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -510,10 +

[PATCH 1/4] Clean up of new format of -falign-FOO.

2018-07-16 Thread marxin
gcc/ChangeLog: 2018-07-11 Martin Liska * align.h: New file. * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly. * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type align_flags of label_to_alignment. * config/

[PATCH 3/4] Define MAX_CODE_ALIGN globally.

2018-07-16 Thread marxin
gcc/ChangeLog: 2018-07-11 Martin Liska * align.h (MAX_CODE_ALIGN): New. (MAX_CODE_ALIGN_VALUE): New. * common/config/i386/i386-common.c (ix86_handle_option): (MAX_CODE_ALIGN): Moved to align.h. * final.c (MAX_CODE_ALIGN): Likewise. * opts.c (par

[PATCH 2/4] Fix coding style of ASM_OUTPUT_ALIGN.

2018-07-16 Thread marxin
gcc/ChangeLog: 2018-07-11 Martin Liska * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing in order to fulfil coding style. * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise. * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise. * config/i386/x8

[PATCH 1/4] Transform switch_conversion into a class.

2018-06-08 Thread marxin
gcc/ChangeLog: 2018-06-07 Martin Liska * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove. (hoist_edge_and_branch_if_true): Likewise. (expand_switch_using_bit_tests_p): Likewise. (struct case_bit_test): Likewise. (case_bit_test_cmp): Likewise.

[PATCH 2/4] Switch other switch expansion methods into classes.

2018-06-08 Thread marxin
gcc/ChangeLog: 2018-06-07 Martin Liska * tree-switch-conversion.c (switch_conversion::collect): Record m_uniq property. (switch_conversion::expand): Bail out for special conditions. (group_cluster::~group_cluster): New. (group_cluster::group_cluster): L

[PATCH 3/4] Enable clustering for switch statements.

2018-06-08 Thread marxin
gcc/ChangeLog: 2018-06-07 Martin Liska * tree-switch-conversion.c (jump_table_cluster::find_jump_tables): New. (bit_test_cluster::find_bit_tests): Likewise. (switch_decision_tree::analyze_switch_statement): Find clusters. * tree-switch-conversion.h (str

[PATCH 0/4][v2] Implement smart multiple switch expansion algorithms

2018-06-08 Thread marxin
x-gnu and survives regression tests. Thoughts? Martin marxin (4): Transform switch_conversion into a class. Switch other switch expansion methods into classes. Enable clustering for switch statements. Change default for jump_table expansion ratio to 8. gcc/testsuite/gcc.dg/tre

[PATCH 4/4] Change default for jump_table expansion ratio to 8.

2018-06-08 Thread marxin
gcc/ChangeLog: 2018-06-07 Martin Liska * tree-switch-conversion.c (jump_table_cluster::can_be_handled): Change default ratio from 10 to 8. --- gcc/tree-switch-conversion.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/gcc/tree-switch-conversio

[PATCH 3/3] Extend -falign-FOO=N to N[:M[:N2[:M2]]]

2018-05-25 Thread marxin
gcc/ChangeLog: 2018-05-25 Denys Vlasenko Martin Liska PR middle-end/66240 PR target/45996 PR c/84100 * common.opt: Rename align options with 'str_' prefix. * common/config/i386/i386-common.c (set_malign_value): New function.

[PATCH 2/3] Temporary remove "at least 8 byte alignment" code from x86

2018-05-25 Thread marxin
gcc/ChangeLog: 2017-04-18 Denys Vlasenko * config/i386/i386-common.c (ix86_handle_option): Remove support for obsolete -malign-loops, -malign-jumps and -malign-functions options. * config/i386/i386.opt: Likewise. --- gcc/config/i386/dragonfly.h | 10 ++ gcc/config/i3

[PATCH 0/3] Extend -falign-FOO=N to N[,M[,N2[,M2]]] version 9

2018-05-25 Thread marxin
e: gcc/testsuite/gcc.target/i386/falign-functions-2.c The patchset is so far tested just on x86_64-linux-gnu with default values. I'll do more testing, but I want to show the to get a feedback. Thanks, Martin marxin (3): Add vec::reverse. Temporary remove "at least 8 byte alignment

[PATCH 1/3] Add vec::reverse.

2018-05-25 Thread marxin
gcc/ChangeLog: 2018-05-25 Martin Liska David Malcolm * vec.c (test_reverse): New. (vec_c_tests): Add new test. * vec.h (vl_ptr>::reverse): New function. --- gcc/vec.c | 38 ++ gcc/vec.h | 14 ++ 2 files cha

[PATCH 07/14] Covert ipa-pure-const.c to symbol_summary.

2018-05-17 Thread marxin
gcc/ChangeLog: 2018-04-24 Martin Liska * ipa-pure-const.c (struct funct_state_d): Do it class instead of struct. (class funct_state_summary_t): New function_summary class. (has_function_state): Remove. (get_function_state): Likewise. (set_functi

[PATCH 08/14] Convert IPA CP to symbol_summary.

2018-05-17 Thread marxin
gcc/ChangeLog: 2018-04-24 Martin Liska * ipa-cp.c (ipcp_store_bits_results): Use ipcp_transformation_sum. (ipcp_store_vr_results): Likewise. * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed to ... (ipcp_transformation_initialize):

[PATCH 02/14] Code refactoring for call_summary.

2018-05-17 Thread marxin
gcc/ChangeLog: 2018-04-24 Martin Liska * symbol-summary.h (release): Move definition out of class declaration. (symtab_removal): Likewise. (symtab_duplication): Likewise. --- gcc/symbol-summary.h | 123 +-- 1 fil

[PATCH 00/14] Finish transition of {symbol,call}_summary.

2018-05-17 Thread marxin
-gnu. Martin marxin (14): Code refactoring of symtab_summary. Code refactoring for call_summary. Rename get methods in symbol-summary.h to get_create. Add {symbol,call}_summary::get method and use it in HSA. Use summaries->get where possible. Small refactoring of multiple calls.

[PATCH 04/14] Add {symbol,call}_summary::get method and use it in HSA.

2018-05-17 Thread marxin
gcc/ChangeLog: 2018-04-24 Martin Liska * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to HSA_INVALID. (hsa_function_summary::hsa_function_summary): Use the new enum value. (hsa_gpu_implementation_p): Use hsa_summaries::get. * hsa-gen.c

[PATCH 14/14] Come up with cgraph_node::get_uid and make cgraph_node::uid private.

2018-05-17 Thread marxin
gcc/ChangeLog: 2018-04-24 Martin Liska * cgraph.c (function_version_hasher::hash): Use cgraph_node::get_uid (). (function_version_hasher::equal): * cgraph.h (cgraph_node::get_uid): New method. * ipa-inline.c (update_caller_keys): Use cgraph_node

[PATCH 12/14] Port edge_growth_cache to call_summary.

2018-05-17 Thread marxin
gcc/ChangeLog: 2018-04-24 Martin Liska * ipa-inline-analysis.c (inline_edge_removal_hook): Remove. (initialize_growth_caches): Remove. (free_growth_caches): Likewise. (do_estimate_edge_time): Use edge_growth_cache. (do_estimate_edge_size): Likewise.

[PATCH 03/14] Rename get methods in symbol-summary.h to get_create.

2018-05-17 Thread marxin
gcc/ChangeLog: 2018-04-24 Martin Liska * config/i386/i386.c (ix86_can_inline_p): Use get_create instead of get. * hsa-common.c (hsa_summary_t::link_functions): Likewise. (hsa_register_kernel): Likewise. * hsa-common.h (hsa_gpu_implementation_p): Likewis

[PATCH 11/14] Port IPA CP to edge_clone_summaries.

2018-05-17 Thread marxin
gcc/ChangeLog: 2018-04-24 Martin Liska * ipa-cp.c (class edge_clone_summary): New summary. (grow_edge_clone_vectors): Remove. (ipcp_edge_duplication_hook): Remove. (class edge_clone_summary_t): New call_summary class. (ipcp_edge_removal_hook): Remove.

[PATCH 05/14] Use summaries->get where possible. Small refactoring of multiple calls.

2018-05-17 Thread marxin
gcc/ChangeLog: 2018-04-24 Martin Liska * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method. (analyze_function_body): Extract multiple calls of get_create. * ipa-inline-analysis.c (simple_edge_hints): Likewise. * ipa-inline.c (recursive_inlining): Use ::

[PATCH 10/14] Add call_summary::get method and m_initialize_when_cloning.

2018-05-17 Thread marxin
gcc/ChangeLog: 2018-04-24 Martin Liska * symbol-summary.h (get): New function. (call_summary::m_initialize_when_cloning): New class member. --- gcc/symbol-summary.h | 66 +++- 1 file changed, 50 insertions(+), 16 deletions(-) d

[PATCH 06/14] Use symtab_summary in ipa-reference.c.

2018-05-17 Thread marxin
gcc/ChangeLog: 2018-04-24 Martin Liska * ipa-reference.c (remove_node_data): Remove. (duplicate_node_data): Likewise. (class ipa_ref_var_info_summary_t): New class. (class ipa_ref_opt_summary_t): Likewise. (get_reference_vars_info): Use ipa_ref_var_info

[PATCH 13/14] Make cgraph_edge::uid really unique.

2018-05-17 Thread marxin
gcc/ChangeLog: 2018-04-24 Martin Liska * cgraph.c (symbol_table::create_edge): Always assign a new unique number. (symbol_table::free_edge): Do not recycle numbers. * cgraph.h (cgraph_edge::get): New method. * symbol-summary.h (symtab_removal): Use it.

[PATCH 01/14] Code refactoring of symtab_summary.

2018-05-17 Thread marxin
gcc/ChangeLog: 2018-04-24 Martin Liska * symbol-summary.h (function_summary): Move constructor implementation out of class declaration. (release): Likewise. (symtab_insertion): Likewise. (symtab_removal): Likewise. (symtab_duplication): Likewise

[PATCH 09/14] Remove cgraph_node::summary_uid and make cgraph_node::uid really unique.

2018-05-17 Thread marxin
gcc/ChangeLog: 2018-05-16 Martin Liska * cgraph.c (cgraph_node::remove): Do not recycle uid. * cgraph.h (symbol_table::release_symbol): Do not pass uid. (symbol_table::allocate_cgraph_symbol): Do not set uid. * passes.c (uid_hash_t): Record removed_nodes by the

[PATCH 3/3] Fix integer overflow in stats of GIMPLE statements.

2018-01-12 Thread marxin
gcc/ChangeLog: 2018-01-12 Martin Liska * gimple.c (gimple_alloc_counts): Use uint64_t instead of int. (gimple_alloc_sizes): Likewise. (dump_gimple_statistics): Use PRIu64 in printf format. * gimple.h: Change uint64_t to int. --- gcc/gimple.c | 17 ++

[PATCH 1/3] Fix --enable-gather-detailed-mem-stats build.

2018-01-12 Thread marxin
gcc/ChangeLog: 2018-01-11 Martin Liska * Makefile.in: As qsort_chk is implemented in vec.c, add vec.o to linkage of gencfn-macros. * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's passing the info to record_node_allocation_statistics. (te

[PATCH 0/3] Fix broken --enable-gather-detailed-mem-stats build.

2018-01-12 Thread marxin
IMPLE statements and trees. Patch survives --enable-gather-detailed-mem-stats with and without --enable-checking=release. I'm testing normal bootstrap and testsuite. Ready after it finishes? Thanks, Martin marxin (3): Fix --enable-gather-detailed-mem-stats build. Fix integer overflow in stat

[PATCH 2/3] Fix integer overflow in stats of trees.

2018-01-12 Thread marxin
gcc/ChangeLog: 2018-01-12 Martin Liska * tree-core.h: Use uint64_t instead of int. * tree.c (tree_node_counts): Likewise. (tree_node_sizes): Likewise. (dump_tree_statistics): Use PRIu64 in printf format. --- gcc/tree-core.h | 4 ++-- gcc/tree.c | 20 +

[PATCH 4/7] GCOV: remove typedef for function_t

2017-11-09 Thread marxin
gcc/ChangeLog: 2017-11-09 Martin Liska * gcov.c (struct function_info): Remove typedef for function_t. (struct source_info): Likewise. (source_info::get_functions_at_location): Likewise. (solve_flow_graph): Likewise. (find_exception_blocks): Likewise.

[PATCH 6/7] GCOV: remove typedef for block_t

2017-11-09 Thread marxin
gcc/ChangeLog: 2017-11-09 Martin Liska * gcov.c (struct block_info): Remove typedef for block_t. (struct line_info): Likewise. (line_info::has_block): Likewise. (EXIT_BLOCK): Likewise. (unblock): Likewise. (circuit): Likewise. (get_cycles

[PATCH 7/7] GCOV: remove typedef of coverage_t.

2017-11-09 Thread marxin
gcc/ChangeLog: 2017-11-09 Martin Liska * gcov.c (struct coverage_info): Remove typedef of coverage_t. (struct source_info): Likewise. (add_branch_counts): Likewise. (add_line_counts): Likewise. (function_summary): Likewise. (output_intermediate_l

[PATCH 5/7] GCOV: remove typedef for arc_t

2017-11-09 Thread marxin
gcc/ChangeLog: 2017-11-09 Martin Liska * gcov.c (struct arc_info): Remove typedef for arc_t. (struct line_info): Likewise. (add_branch_counts): Likewise. (output_branch_count): Likewise. (function_info::~function_info): Likewise. (circuit): Likew

[PATCH 3/7] GCOV: introduce vector for function_info::counts.

2017-11-09 Thread marxin
gcc/ChangeLog: 2017-11-09 Martin Liska * gcov.c (function_info::function_info): Remove num_counts and add vector. (function_info::~function_info): Use the vector. (process_file): Likewise. (read_graph_file): Likewise. (read_count_file): Likewise.

[PATCH 1/7] GCOV: introduce global vector of functions

2017-11-09 Thread marxin
gcc/ChangeLog: 2017-11-09 Martin Liska * gcov.c (read_graph_file): Store to global vector of functions. (read_count_file): Iterate the vector. (process_file): Likewise. (generate_results): Likewise. (release_structures): Likewise. --- gcc/gcov.c | 108 +

[PATCH 2/7] GCOV: simplify usage of function_info::artificial.

2017-11-09 Thread marxin
gcc/ChangeLog: 2017-11-09 Martin Liska * gcov.c (is_artificial): New function. (process_file): Erase all artificial early. (generate_results): Skip as all artificial are already removed. --- gcc/gcov.c | 66 +-

[PATCH 0/7] GCOV: infrastructure clean-up

2017-11-09 Thread marxin
Hello. Following patch series is quite mechanical, it adds usage of STL containers and it removes many typedefs that are with C++ not needed in my oppinion. Patch survives gcov.exp test-suite. Thanks, Martin marxin (7): GCOV: introduce global vector of functions GCOV: simplify usage of

[PATCH 6/7] GCOV: Vector refactoring II

2017-10-26 Thread marxin
gcc/ChangeLog: 2017-10-26 Martin Liska * gcov.c (struct line_info): Remove it's typedef. (line_info::line_info): Add proper ctor. (line_info::has_block): Do not use a typedef. (struct source_info): Do not use typedef. (circuit): Likewise. (get_cy

[PATCH 0/7] GCOV: another set of improvements

2017-10-26 Thread marxin
Hi. As I've spent recently some time in gcov, I decided to enhance the tool a bit. My main target is PR48463 which will remove assumption that multiple functions can't start on a same line. I've got pending patch that will be send soon. Thanks for review, Martin marxin (7):

[PATCH 1/7] GCOV: document behavior of -fkeep-{static,inline}-functions (PR gcov-profile/82633).

2017-10-26 Thread marxin
gcc/ChangeLog: 2017-10-23 Martin Liska PR gcov-profile/82633 * doc/gcov.texi: Document -fkeep-{static,inline}-functions and their interaction with GCOV infrastructure. * configure.ac: Add -fkeep-{inline,static}-functions to coverage_flags. * conf

[PATCH 5/7] GCOV: std::vector refactoring.

2017-10-26 Thread marxin
gcc/ChangeLog: 2017-10-26 Martin Liska * gcov.c (struct source_info): Remove typedef. (source_info::source_info): Add proper ctor. (accumulate_line_counts): Use struct, not it's typedef. (output_gcov_file): Likewise. (output_lines): Likewise. (ma

[PATCH 3/7] GCOV: add support for lines with an unexecuted lines.

2017-10-26 Thread marxin
It's possible to have a line of code that has a non-zero coverage. However, it can contain unexecuted blocks and I hope adding a notification can be usefull. LLVM also does that: -:0:Source:ternary.c -:0:Graph:ternary.gcno -:0:Data:ternary.gcda -:0:R

[PATCH 7/7] GCOV: std::vector refactoring III

2017-10-26 Thread marxin
gcc/ChangeLog: 2017-10-26 Martin Liska * gcov.c (struct name_map): do not use typedef. Define operator== and operator<. (name_search): Remove. (name_sort): Remove. (main): Do not allocate names. (process_file): Add vertical space. (genera

[PATCH 4/7] GCOV: add -j argument (human readable format).

2017-10-26 Thread marxin
Human readable format is quite useful in my opinion. There's example: -:1:unsigned 14.00K:2:loop (unsigned n, int value) -:3:{ 21.00M:4: for (unsigned i = 0; i < n - 1; i++) -:5: { 20.99M:6:value += i; -:7: } -:

[PATCH 2/7] GCOV: introduce usage of terminal colors.

2017-10-26 Thread marxin
I consider using colors in context of gcov as very useful. There's example for tramp3d: https://pste.eu/p/Tl2D.html gcc/ChangeLog: 2017-10-23 Martin Liska * color-macros.h: New file. * diagnostic-color.c: Factor out color related to macros to color-macros.h. *

[PATCH 2/3] Make early return predictor more precise.

2017-06-06 Thread marxin
gcc/ChangeLog: 2017-05-26 Martin Liska PR tree-optimization/79489 * gimplify.c (maybe_add_early_return_predict_stmt): New function. (gimplify_return_expr): Call the function. * predict.c (tree_estimate_probability_bb): Remove handling of early re

[PATCH 3/3] Rework cold and hot label attributes in predict.c.

2017-06-06 Thread marxin
gcc/ChangeLog: 2017-05-26 Martin Liska * gimplify.c (gimplify_label_expr): Insert GIMPLE_PREDICT statements on cold and hot labels. * predict.c (tree_estimate_probability_bb): Remove the prediction from this place. gcc/testsuite/ChangeLog: 2017-05-31 Martin L

[PATCH 1/3] Come up with selftests for predict.c.

2017-06-06 Thread marxin
gcc/ChangeLog: 2017-05-26 Martin Liska * predict.c (struct branch_predictor): New struct. (test_prediction_value_range): New test. (predict_tests_c_tests): New function. * selftest-run-tests.c (selftest::run_tests): Run the function. * selftest.h: Declar

[PATCH 0/3] Rework early return and hot/cold label predictors

2017-06-06 Thread marxin
hat I would like to add a sanity unit tests for values of predictors. And finally, I was asked by Honza to transform cold/hot label predictors to GIMPLE_PREDICT as well. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin marxin (3): Come up

[PATCH 8/8] Enhance documentation of gcov.

2017-04-28 Thread marxin
gcc/ChangeLog: 2017-04-27 Martin Liska * doc/gcov.texi: Enhance documentation of gcov. --- gcc/doc/gcov.texi | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/doc/gcov.texi b/gcc/doc/gcov.texi index 1befb5a3e08..c96f86df830 100644 --- a/gcc/doc/gcov.texi ++

[PATCH 4/8] Introduce new option -w which shows verbose informations.

2017-04-28 Thread marxin
gcc/ChangeLog: 2017-04-26 Martin Liska * gcov.c (process_args): Handle new argument 'w'. (read_graph_file): Assign ID to BBs. (output_branch_count): Display BB # if verbose flag is set. (output_lines): Likewise for arcs. (print_usage): Add '--verbose' op

[PATCH 7/8] Sort options of gcov, gcov-dump and gcov-tool both in --help and documentation

2017-04-28 Thread marxin
gcc/ChangeLog: 2017-04-27 Martin Liska * doc/gcov.texi: Sort options in alphabetic order. * doc/gcov-dump.texi: Likewise. * doc/gcov-tool.texi: Likewise. * gcov.c (print_usage): Likewise. * gcov-dump.c (print_usage): Likewise. * gcov-tool.c (prin

[PATCH 5/8] Make gcno more precise about BBs really belonging to a line (PR gcov-profile/79891).

2017-04-28 Thread marxin
gcc/ChangeLog: 2017-04-26 Martin Liska PR gcov-profile/79891 * gcov.c (add_line_counts): Assign BBs to lines just if the BB is marked by compiler as living on a line. (get_cycles_count): Remove usage of the union. (output_intermediate_file): Likewise.

[PATCH 1/8] gcno file: do not stream block flags (PR gcov-profile/80031).

2017-04-28 Thread marxin
gcc/ChangeLog: 2017-03-13 Martin Liska PR gcov-profile/80031 * gcov-dump.c (tag_blocks): Just print number of basic blocks. * gcov-io.h (GCOV_TAG_BLOCKS_NUM): Remove unused macro. * gcov.c (read_graph_file): Read just number of blocks. * profile.c (branc

  1   2   >