changeset 659:19f25e603e7b

6812721: Block's frequency should not be NaN Summary: Set MIN_BLOCK_FREQUENCY block's frequency when calculated block's frequency is NaN Reviewed-by: never
author kvn
date Tue, 03 Mar 2009 18:25:57 -0800
parents d8c7fa77a6dc
children 56aae7be60d4
files src/share/vm/opto/gcm.cpp
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/opto/gcm.cpp	Tue Mar 03 10:34:22 2009 -0800
+++ b/src/share/vm/opto/gcm.cpp	Tue Mar 03 18:25:57 2009 -0800
@@ -1901,7 +1901,8 @@
   for (int i = 0; i < _members.length(); i++) {
     CFGElement* s = _members.at(i);
     float block_freq = s->_freq * loop_freq;
-    if (block_freq < MIN_BLOCK_FREQUENCY) block_freq = MIN_BLOCK_FREQUENCY;
+    if (g_isnan(block_freq) || block_freq < MIN_BLOCK_FREQUENCY)
+      block_freq = MIN_BLOCK_FREQUENCY;
     s->_freq = block_freq;
   }
   CFGLoop* ch = _child;