--- a/hotspot/src/share/vm/opto/gcm.cpp Tue Feb 25 14:09:02 2014 +0100
+++ b/hotspot/src/share/vm/opto/gcm.cpp Tue Feb 25 17:51:27 2014 +0100
@@ -1661,10 +1661,10 @@
}
assert (_members.length() > 0, "no empty loops");
Block* hd = head();
- hd->_freq = 1.0f;
+ hd->_freq = 1.0;
for (int i = 0; i < _members.length(); i++) {
CFGElement* s = _members.at(i);
- float freq = s->_freq;
+ double freq = s->_freq;
if (s->is_block()) {
Block* b = s->as_Block();
for (uint j = 0; j < b->_num_succs; j++) {
@@ -1676,7 +1676,7 @@
assert(lp->_parent == this, "immediate child");
for (int k = 0; k < lp->_exits.length(); k++) {
Block* eb = lp->_exits.at(k).get_target();
- float prob = lp->_exits.at(k).get_prob();
+ double prob = lp->_exits.at(k).get_prob();
update_succ_freq(eb, freq * prob);
}
}
@@ -1688,7 +1688,7 @@
// inner blocks do not get erroneously scaled.
if (_depth != 0) {
// Total the exit probabilities for this loop.
- float exits_sum = 0.0f;
+ double exits_sum = 0.0f;
for (int i = 0; i < _exits.length(); i++) {
exits_sum += _exits.at(i).get_prob();
}
@@ -1935,7 +1935,7 @@
//------------------------------update_succ_freq-------------------------------
// Update the appropriate frequency associated with block 'b', a successor of
// a block in this loop.
-void CFGLoop::update_succ_freq(Block* b, float freq) {
+void CFGLoop::update_succ_freq(Block* b, double freq) {
if (b->_loop == this) {
if (b == head()) {
// back branch within the loop
@@ -1976,11 +1976,11 @@
// Scale frequency of loops and blocks by trip counts from outer loops
// Do a top down traversal of loop tree (visit outer loops first.)
void CFGLoop::scale_freq() {
- float loop_freq = _freq * trip_count();
+ double loop_freq = _freq * trip_count();
_freq = loop_freq;
for (int i = 0; i < _members.length(); i++) {
CFGElement* s = _members.at(i);
- float block_freq = s->_freq * loop_freq;
+ double block_freq = s->_freq * loop_freq;
if (g_isnan(block_freq) || block_freq < MIN_BLOCK_FREQUENCY)
block_freq = MIN_BLOCK_FREQUENCY;
s->_freq = block_freq;
@@ -1993,7 +1993,7 @@
}
// Frequency of outer loop
-float CFGLoop::outer_loop_freq() const {
+double CFGLoop::outer_loop_freq() const {
if (_child != NULL) {
return _child->_freq;
}
@@ -2042,7 +2042,7 @@
k = 0;
}
Block *blk = _exits.at(i).get_target();
- float prob = _exits.at(i).get_prob();
+ double prob = _exits.at(i).get_prob();
tty->print(" ->%d@%d%%", blk->_pre_order, (int)(prob*100));
}
tty->print("\n");