r198416 - in /trunk/gcc: ChangeLog basic-block....

tejohnson@gcc.gnu.org tejohnson@gcc.gnu.org
Mon Apr 29 13:22:00 GMT 2013


Author: tejohnson
Date: Mon Apr 29 13:22:46 2013
New Revision: 198416

URL: http://gcc.gnu.org/viewcvs?rev=198416&root=gcc&view=rev
Log:
This patch fixes PR bootstrap/57077. Certain new uses of apply_probability
are actually scaling the counts up, and the scale factor should not 
be treated as a probability as the value may exceed REG_BR_PROB_BASE.
One example (from the PR) is when scaling counts up in LTO when merging
profiles. Another example I found when preparing the patch to use
the rounding divide in more places is when inlining COMDAT functions.

Add new helper function apply_scale that does the scaling without
the probability range check. I audited the new uses of apply_probability
and changed the calls as appropriate.

2013-04-29  Teresa Johnson  <tejohnson@google.com>

	PR bootstrap/57077
	* basic-block.h (apply_scale): New function.
	(apply_probability): Use apply_scale.
	* gimple-streamer-in.c (input_bb): Ditto.
	* lto-streamer-in.c (input_cfg): Ditto.
	* lto-cgraph.c (merge_profile_summaries): Ditto.
	* tree-optimize.c (execute_fixup_cfg): Ditto.
	* tree-inline.c (copy_bb): Update comment to use
	apply_scale.
	(copy_edges_for_bb): Ditto.
	(copy_cfg_body): Ditto.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/basic-block.h
    trunk/gcc/gimple-streamer-in.c
    trunk/gcc/lto-cgraph.c
    trunk/gcc/lto-streamer-in.c
    trunk/gcc/tree-inline.c
    trunk/gcc/tree-optimize.c



More information about the Gcc-cvs mailing list