United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6837146 Should perform unswitch before maximally unroll in loop transformation
JDK-6837146 : Should perform unswitch before maximally unroll in loop transformation

Details
Type:
Bug
Submit Date:
2009-05-04
Status:
Resolved
Updated Date:
2010-04-02
Project Name:
JDK
Resolved Date:
2009-06-17
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs16
Fixed Versions:
hs16 (b04)

Related Reports
Backport:
Backport:

Sub Tasks

Description
Here is the piece of code in loop transformation:
   if( should_maximally_unroll ) {
      // Here we did some unrolling and peeling.  Eventually we will
      // completely unroll this loop and it will no longer be a loop.
      phase->do_maximally_unroll(this,old_new);
      return true;
    }
    if (should_unswitch) {
      phase->do_unswitching(this, old_new);
      return true;
    }

Suppose the loop can be both fully unrolled and unswitched, the loop unswitching 
optimization will never be executed. However, if we change the order of these two optimizations, both can be performed (and thus has the potential benefit).

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/273b2358ef1a
                                     
2009-05-28



Hardware and Software, Engineered to Work Together