JDK-5030922 : BugFixes from Azul Systems
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 1.4.2_04,5.0u5,6
  • Priority: P5
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux,linux_2.4,solaris_8,solaris_9
  • CPU: generic,x86,sparc
  • Submitted: 2004-04-13
  • Updated: 2004-08-30
  • Resolved: 2004-08-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6
1.4.2_08Fixed 6 mustangFixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
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
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mustang FIXED IN: mustang INTEGRATED IN: mustang
31-08-2004

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
31-08-2004

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