diff options
author | obrien <obrien@FreeBSD.org> | 2002-05-09 20:02:13 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2002-05-09 20:02:13 +0000 |
commit | c8f5fc7032940ad6633f932ac40cade82ec4d0cc (patch) | |
tree | 29a0f0a6c79a69ecc64f612947a0fe5904311713 /contrib/gcc/predict.c | |
parent | c9ab9ae440a8066b2c2b85b157b1fdadcf09916a (diff) | |
download | FreeBSD-src-c8f5fc7032940ad6633f932ac40cade82ec4d0cc.zip FreeBSD-src-c8f5fc7032940ad6633f932ac40cade82ec4d0cc.tar.gz |
Gcc 3.1.0 pre-release from the FSF anoncvs repo on 9-May-2002 15:57:15 EDT.
Diffstat (limited to 'contrib/gcc/predict.c')
-rw-r--r-- | contrib/gcc/predict.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/contrib/gcc/predict.c b/contrib/gcc/predict.c index 6961a33..bcafef2 100644 --- a/contrib/gcc/predict.c +++ b/contrib/gcc/predict.c @@ -955,6 +955,7 @@ estimate_bb_frequencies (loops) for (i = -2; i < n_basic_blocks; i++) { basic_block bb; + volatile double tmp; if (i == -2) bb = ENTRY_BLOCK_PTR; @@ -962,8 +963,12 @@ estimate_bb_frequencies (loops) bb = EXIT_BLOCK_PTR; else bb = BASIC_BLOCK (i); - bb->frequency - = BLOCK_INFO (bb)->frequency * BB_FREQ_MAX / freq_max + 0.5; + + /* ??? Prevent rounding differences due to optimization on x86. */ + tmp = BLOCK_INFO (bb)->frequency * BB_FREQ_MAX; + tmp /= freq_max; + tmp += 0.5; + bb->frequency = tmp; } free_aux_for_blocks (); |