Commit e53f77c6 by Martin Liska Committed by Martin Liska

Fix setting of hotness in non-LTO mode (PR gcov-profile/77698).

2018-11-05  Martin Liska  <mliska@suse.cz>

	PR gcov-profile/77698
	* ipa-profile.c (ipa_profile): Adjust hotness threshold
	only in LTO mode.
2018-11-05  Martin Liska  <mliska@suse.cz>

	PR gcov-profile/77698
	* gcc.dg/tree-prof/pr77698.c: New test.

From-SVN: r265784
parent 51020b00
2018-11-05 Martin Liska <mliska@suse.cz>
PR gcov-profile/77698
* ipa-profile.c (ipa_profile): Adjust hotness threshold
only in LTO mode.
2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de> 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR tree-optimization/86572 PR tree-optimization/86572
...@@ -533,11 +533,10 @@ ipa_profile (void) ...@@ -533,11 +533,10 @@ ipa_profile (void)
cumulated_size * 100.0 / overall_size); cumulated_size * 100.0 / overall_size);
} }
if (threshold > get_hot_bb_threshold () if (in_lto_p)
|| in_lto_p)
{ {
if (dump_file) if (dump_file)
fprintf (dump_file, "Threshold updated.\n"); fprintf (dump_file, "Setting hotness threshold in LTO mode.\n");
set_hot_bb_threshold (threshold); set_hot_bb_threshold (threshold);
} }
} }
......
2018-11-05 Martin Liska <mliska@suse.cz>
PR gcov-profile/77698
* gcc.dg/tree-prof/pr77698.c: New test.
2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de> 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR tree-optimization/86572 PR tree-optimization/86572
......
/* { dg-options "-O2 -fno-tree-vectorize -funroll-loops --param max-unroll-times=4 -fno-inline -fdump-rtl-alignments" } */
volatile long int g;
volatile long int j = 0;
void foo(long int *a, long int *b, long int n)
{
long int i;
for (i = 0; i < n; i++)
a[j] = *b;
}
long int a, b;
int main()
{
a = 1; b = 2;
foo(&a, &b, 1000000);
g = a+b;
return 0;
}
/* { dg-final-use-not-autofdo { scan-rtl-dump-times "internal loop alignment added" 1 "alignments"} } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment