United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6384206 Phis which are later unneeded are impairing our ability to inline based on static types
JDK-6384206 : Phis which are later unneeded are impairing our ability to inline based on static types

Details
Type:
Bug
Submit Date:
2006-02-10
Status:
Resolved
Updated Date:
2010-04-02
Project Name:
JDK
Resolved Date:
2008-10-07
Component:
hotspot
OS:
solaris_9,linux
Sub-Component:
compiler
CPU:
x86,sparc
Priority:
P3
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:
hs14 (b06)

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

Sub Tasks

Description
While investigating the performance of HashMap.get(k) I noticed that in cases where the static type of k is available C2 isn't taking advantage of the information in making it's inline decisions for get.  The problem is that Phis which are introduced for the join of a diamond aren't being eliminated aggressively during parsing when one of the paths is proved dead.  Additionally unneeded loop phis are hiding the type k in the search loop, impairing the inlining of equals.  Post parse inlining which remove the need for aggressive elimination of phis but for now we need a better strategy for simplification of phis.

                                    

Comments
EVALUATION

Some simple changes to parse collapse phis for dead codes paths.  A better strategy is to rely on RPO for parse order and when you reach a block with unparsed predecessors, assume they are dead unless your block is a backward branch target.

Eliminating phis for loops requires some analysis though it can be very cheap if we are looking for the simple case.
                                     
2006-02-10
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/194b8e3a2fc4
                                     
2008-09-17



Hardware and Software, Engineered to Work Together