United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6667595 Set probability FAIR for pre-, post- loops and ALWAYS for main loop
JDK-6667595 : Set probability FAIR for pre-, post- loops and ALWAYS for main loop

Details
Type:
Enhancement
Submit Date:
2008-02-26
Status:
Resolved
Updated Date:
2010-04-03
Project Name:
JDK
Resolved Date:
2008-11-04
Component:
hotspot
OS:
solaris_10
Sub-Component:
compiler
CPU:
sparc
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs12
Fixed Versions:
hs14 (b06)

Related Reports
Backport:
Backport:
Relates:

Sub Tasks

Description
C2 clone original loop's probability when it constructs pre-, main, post- loops.
Then C2 adds zero-trip guard for main loop with probability FAIR.
As result a main loop's probability could be half of a pre-loop's probability
and RA may generates stack spills in the main loop and not in the pre-loop.

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/cc80376deb0c
                                     
2008-10-03
SUGGESTED FIX

- Fix loop's probability.
- Prevent some ideal optimizations for loop's trip counter to avoid
having two live values which could cause spilling.
- Add several ideal optimizations to improve code from a loop cloning.
- Improve a spill copy removal in post allocation.
                                     
2008-10-03



Hardware and Software, Engineered to Work Together