Commit b69d9ac6 by Jan Hubicka Committed by Jan Hubicka

predict.c (maybe_hot_bb_p): Do not check profile status.


	* predict.c (maybe_hot_bb_p): Do not check profile status.
	(maybe_hot_edge_p): Likewise.
	(probably_never_executed): Check for zero counts even if profile
	is not read.
	(unlikely_executed_edge_p): New function.
	(unlikely_executed_stmt_p): New function.
	(unlikely_executed_bb_p): New function.
	(set_even_probabilities): Use unlikely predicates.
	(combine_predictions_for_bb): Likewise.
	(predict_paths_for_bb): Likewise.
	(predict_paths_leading_to_edge): Likewise.
	(determine_unlikely_bbs): New function.
	(estimate_bb_frequencies): Use it.
	(compute_function_frequency): Use zero counts even if profile is
	not read.
	* profile-count.h: Fix typo.

	* g++.dg/tree-ssa/counts-1.C: New testcase.
	* gcc.dg/tree-ssa/counts-1.c: New testcase.

From-SVN: r249013
parent c46f9051
2017-06-08 Jan Hubicka <hubicka@ucw.cz>
* predict.c (maybe_hot_bb_p): Do not check profile status.
(maybe_hot_edge_p): Likewise.
(probably_never_executed): Check for zero counts even if profile
is not read.
(unlikely_executed_edge_p): New function.
(unlikely_executed_stmt_p): New function.
(unlikely_executed_bb_p): New function.
(set_even_probabilities): Use unlikely predicates.
(combine_predictions_for_bb): Likewise.
(predict_paths_for_bb): Likewise.
(predict_paths_leading_to_edge): Likewise.
(determine_unlikely_bbs): New function.
(estimate_bb_frequencies): Use it.
(compute_function_frequency): Use zero counts even if profile is
not read.
* profile-count.h: Fix typo.
2017-08-08 Julia Koval <julia.koval@intel.com>
* config/i386/avx512bwintrin.h (_mm512_mask_cvtepi16_storeu_epi8,
......
......@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3. If not see
profile counts known while other do not - for example when LTO optimizing
partly profiled program or when profile was lost due to COMDAT merging.
For this information profile_count tracks more information than
For this reason profile_count tracks more information than
just unsigned integer and it is also ready for profile mismatches.
The API of this data type represent operations that are natural
on profile counts - sum, difference and operation with scales and
......
2017-06-08 Jan Hubicka <hubicka@ucw.cz>
* g++.dg/tree-ssa/counts-1.C: New testcase.
* gcc.dg/tree-ssa/counts-1.c: New testcase.
2017-08-08 Julia Koval <julia.koval@intel.com>
* gcc.target/i386/avx512bw-vpmovswb-1.c: Add new intrinsics to test.
......
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
void foo();
extern void abort (void);
static __attribute__ ((noinline))
void mark_me_unlikely ()
{
foo();
foo();
foo();
foo();
}
void i_am_not_unlikely()
{
try { foo(); }
catch (int) {mark_me_unlikely ();}
}
/* { dg-final { scan-tree-dump "mark_me_unlikely\[^\r\n\]*(unlikely executed)" "optimized"} } */
/* { dg-final { scan-tree-dump-not "i_am_not_unlikely\[^\r\n\]*(unlikely executed)" "optimized"} } */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
void unlikely () __attribute__ ((cold));
void unlikely2 () __attribute__ ((cold));
__attribute__ ((noinline)) void
i_am_also_unlikely (int a)
{
if (a)
unlikely ();
else
unlikely2 ();
}
void
i_am_also_unlikely2 (int a,int b)
{
if (b)
i_am_also_unlikely (a);
else
unlikely ();
}
void
i_am_not_unlikely (int a,int b,int c)
{
if (c)
__builtin_exit (0);
i_am_also_unlikely2 (a,b);
}
/* Detect i_am_also_unlikely i_am_also_unlikely2 as unlikely. */
/* { dg-final { scan-tree-dump "i_am_also_unlikely\[^\r\n\]*(unlikely executed)" "optimized"} } */
/* { dg-final { scan-tree-dump "i_am_also_unlikely2\[^\r\n\]*(unlikely executed)" "optimized"} } */
/* { dg-final { scan-tree-dump-not "i_am_not_unlikely\[^\r\n\]*(unlikely executed)" "optimized"} } */
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