On 1/21/21 7:40 PM, Martin Liška wrote:
Most of the changes are in known contexts:
I've made some progress here, but still I'm unable to get a reproducible build. Now I see difference in: 161/ 649: cp/decl.o: different 180/ 649: cp/parser.o: different 262/ 649: generic-match.o: different 283/ 649: gimple-match.o: different 343/ 649: insn-emit.o: different 360/ 649: ipa-icf.o: different looking at *profile dump files, I only have changes in tp_first_run which end with a different output. Do you have any idea what can influence the minimum merging of tp_first_run profiles? Martin
diff --git a/Makefile.in b/Makefile.in index 03785200dc7..c8ebc90f622 100644 --- a/Makefile.in +++ b/Makefile.in @@ -565,7 +565,7 @@ STAGEprofile_TFLAGS = $(STAGE2_TFLAGS) STAGEtrain_CFLAGS = $(filter-out -fchecking=1,$(STAGE3_CFLAGS)) STAGEtrain_TFLAGS = $(filter-out -fchecking=1,$(STAGE3_TFLAGS)) -STAGEfeedback_CFLAGS = $(STAGE4_CFLAGS) -fprofile-use -fprofile-reproducible=parallel-runs +STAGEfeedback_CFLAGS = $(STAGE4_CFLAGS) -fprofile-use -fprofile-reproducible=parallel-runs -fdump-ipa-profile STAGEfeedback_TFLAGS = $(STAGE4_TFLAGS) STAGEautoprofile_CFLAGS = $(STAGE2_CFLAGS) -g diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 1a114a2e2d0..6aeeb7118e1 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -3927,6 +3927,7 @@ struct typename_hasher : ggc_ptr_hash<tree_node> static bool equal (tree t1, const typename_info *t2) + __attribute__ ((no_profile_instrument_function)) { return (TYPE_IDENTIFIER (t1) == t2->name && TYPE_CONTEXT (t1) == t2->scope diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 4b2bca3fd11..3cd2130c3de 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -1492,6 +1492,7 @@ static struct obstack declarator_obstack; /* Alloc BYTES from the declarator memory pool. */ static inline void * +__attribute__ ((no_profile_instrument_function)) alloc_declarator (size_t bytes) { return obstack_alloc (&declarator_obstack, bytes); @@ -23056,6 +23057,7 @@ cp_parser_late_return_type_opt (cp_parser* parser, cp_declarator *declarator, unqualified-id. */ static tree +__attribute__ ((no_profile_instrument_function)) cp_parser_declarator_id (cp_parser* parser, bool optional_p) { tree id; diff --git a/gcc/hash-table.h b/gcc/hash-table.h index a6e0ac8eea9..3a4d01d5ef8 100644 --- a/gcc/hash-table.h +++ b/gcc/hash-table.h @@ -347,6 +347,7 @@ hash_table_mod1 (hashval_t hash, unsigned int index) /* Compute the secondary table index for HASH given current prime index. */ inline hashval_t +__attribute__ ((no_profile_instrument_function)) hash_table_mod2 (hashval_t hash, unsigned int index) { const struct prime_ent *p = &prime_tab[index]; @@ -422,7 +423,7 @@ public: /* This function searches for a hash table entry equal to the given COMPARABLE element starting with the given HASH value. It cannot be used to insert or delete an element. */ - value_type &find_with_hash (const compare_type &, hashval_t); + value_type &find_with_hash (const compare_type &, hashval_t) __attribute__ ((no_profile_instrument_function)); /* Like find_slot_with_hash, but compute the hash value from the element. */ value_type &find (const value_type &value) @@ -443,7 +444,7 @@ public: write the value you want into the returned slot. When inserting an entry, NULL may be returned if memory allocation fails. */ value_type *find_slot_with_hash (const compare_type &comparable, - hashval_t hash, enum insert_option insert); + hashval_t hash, enum insert_option insert) __attribute__ ((no_profile_instrument_function)); /* This function deletes an element with the given COMPARABLE value from hash table starting with the given HASH. If there is no @@ -527,7 +528,7 @@ private: void empty_slow (); value_type *alloc_entries (size_t n CXX_MEM_STAT_INFO) const; - value_type *find_empty_slot_for_expand (hashval_t); + value_type *find_empty_slot_for_expand (hashval_t) __attribute__ ((no_profile_instrument_function)); void verify (const compare_type &comparable, hashval_t hash); bool too_empty_p (unsigned int); void expand ();