aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/opto/coalesce.cpp
diff options
context:
space:
mode:
authornever <none@none>2010-08-19 14:51:47 -0700
committernever <none@none>2010-08-19 14:51:47 -0700
commit7cda8aba0cc1ae3404e2f37eb211eea01bc39905 (patch)
treef383cc9333cae34ef71c63484b6fcc5b2bafc3a7 /src/share/vm/opto/coalesce.cpp
parentfdfe6b7f0b223b07d1634f928b90466295a67653 (diff)
6978249: spill between cpu and fpu registers when those moves are fast
Reviewed-by: kvn
Diffstat (limited to 'src/share/vm/opto/coalesce.cpp')
-rw-r--r--src/share/vm/opto/coalesce.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/share/vm/opto/coalesce.cpp b/src/share/vm/opto/coalesce.cpp
index 311b55a71..2144b59ec 100644
--- a/src/share/vm/opto/coalesce.cpp
+++ b/src/share/vm/opto/coalesce.cpp
@@ -780,6 +780,14 @@ bool PhaseConservativeCoalesce::copy_copy( Node *dst_copy, Node *src_copy, Block
// Number of bits free
uint rm_size = rm.Size();
+ if (UseFPUForSpilling && rm.is_AllStack() ) {
+ // Don't coalesce when frequency difference is large
+ Block *dst_b = _phc._cfg._bbs[dst_copy->_idx];
+ Block *src_def_b = _phc._cfg._bbs[src_def->_idx];
+ if (src_def_b->_freq > 10*dst_b->_freq )
+ return false;
+ }
+
// If we can use any stack slot, then effective size is infinite
if( rm.is_AllStack() ) rm_size += 1000000;
// Incompatible masks, no way to coalesce