United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-5030922 : BugFixes from Azul Systems

Details
Type:
Bug
Submit Date:
2004-04-13
Status:
Resolved
Updated Date:
2004-08-30
Project Name:
JDK
Resolved Date:
2004-08-30
Component:
hotspot
OS:
solaris_9,solaris_8,linux_2.4,linux
Sub-Component:
compiler
CPU:
x86,sparc,generic
Priority:
P5
Resolution:
Fixed
Affected Versions:
1.4.2_04,5.0u5,6
Fixed Versions:

Related Reports
Backport:
Backport:
Duplicate:
Duplicate:
Duplicate:
Duplicate:
Relates:
Relates:
Relates:

Sub Tasks

Description
Several bug fixes were recommended from Cliff Click of Azul Systems
The fix for this bug containes fixes only for the next 2 problems described by Cliff.
It does not fix the problem described in Comments section. 
That problem is addressed in 6472714.

======================================================================================
Subject: Bug dejeur
Date: Mon, 02 Feb 2004 08:20:47 -0800
From: Cliff Click <###@###.###>
Organization: Azul Systems
To: David Cox <###@###.###>

Fix a OBOB in the allocator.  Bug is having a derived live range merging
at a Phi; this requires a bases be merged at the same block, sometimes
requiring a base-phi be inserted.  If the block has no instructions
between the last Phi and the block-ending branch, you'll miss out that a
base-phi is needed.  Requires a Sparc V9-style compare-n-branch in 1
instruction style thing, plus of course a merging derived live range.

====
//java/working/main-dev/spin1/java/hotspot/src/share/vm/opto/chaitin.cpp#2
(text) ====

@@ -1411,7 +1411,7 @@

   // Search the current block for an existing base-Phi
   Block *b = _cfg._bbs[derived->_idx];
-  for( i = 1; i < b->end_idx(); i++ ) {// Search for matching Phi
+  for( i = 1; i <= b->end_idx(); i++ ) {// Search for matching Phi
     Node *phi = b->_nodes[i];
     if( !phi->is_Phi() ) {      // Found end of Phis with no match?
       b->_nodes.insert( i, base ); // Must insert created Phi here as base

Enjoy!
Cliff
===============================================================================

Subject: HotSpot bug dejeur
Date: Mon, 02 Feb 2004 08:13:41 -0800
From: Cliff Click <###@###.###>
Organization: Azul Systems
To: David Cox <###@###.###>

I fixed a bug with trying to split-thru-phi a c-move where the guard
value is loop-INvariant and the data values are loop-Varying.
I added this code:

==== //java/main-dev/java/hotspot/src/share/vm/opto/loopopts.cpp#14
(text) ====

@@ -690,6 +690,8 @@
       if( get_ctrl(iff->in(2)) == n_ctrl ||
       get_ctrl(iff->in(3)) == n_ctrl )
     return;            // Inputs not yet split-up
+      if( get_loop(n_ctrl) != get_loop(get_ctrl(iff)) )
+        return;                 // Loop-invar test gates loop-varying CMOVE?
     }

     // Do not do 'split-if' if some paths are dead.  First do dead code

Enjoy!
Cliff

                                    

Comments
SUGGESTED FIX

//java/working/main-dev/spin1/java/hotspot/src/share/vm/opto/chaitin.cpp#2
(text) ====

@@ -1411,7 +1411,7 @@

   // Search the current block for an existing base-Phi
   Block *b = _cfg._bbs[derived->_idx];
-  for( i = 1; i < b->end_idx(); i++ ) {// Search for matching Phi
+  for( i = 1; i <= b->end_idx(); i++ ) {// Search for matching Phi
     Node *phi = b->_nodes[i];
     if( !phi->is_Phi() ) {      // Found end of Phis with no match?
       b->_nodes.insert( i, base ); // Must insert created Phi here as base 

==== //java/main-dev/java/hotspot/src/share/vm/opto/loopopts.cpp#14
(text) ====

@@ -690,6 +690,8 @@
       if( get_ctrl(iff->in(2)) == n_ctrl ||
       get_ctrl(iff->in(3)) == n_ctrl )
     return;            // Inputs not yet split-up
+      if( get_loop(n_ctrl) != get_loop(get_ctrl(iff)) )
+        return;                 // Loop-invar test gates loop-varying
CMOVE?
     }

     // Do not do 'split-if' if some paths are dead.  First do dead code
                                     
2004-08-31
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
mustang

FIXED IN:
mustang

INTEGRATED IN:
mustang


                                     
2004-08-31
EVALUATION

Changes were reviewed, tested and putback
###@###.### 2004-08-04
                                     
2004-08-04



Hardware and Software, Engineered to Work Together