Request for reviews (S): 6590177, 6667573, 6667580, 6667581, 6667588, 6667595, 6667618

Vladimir Kozlov Vladimir.Kozlov at Sun.COM
Wed Feb 27 15:28:24 PST 2008


Resending to openjdk.
I fixed changes for 6667580 after Chuck's review.
And I redid changes (now smaller and one file) for 6590177.

Thanks,
Vladimir

--------------------------------------------------------------------------------------------
http://webrev.invokedynamic.info/kvn/6590177/index.html

Fixed 6590177: jck60019 test assert(!repeated,"do not walk merges twice")

Problem:
In the current code a store node could be processed before and removed
from worklist_store but it will be marked in should_not_repeat vector set.
Next time we process the same store node it will be not on worklist_store
but in should_not_repeat and it will cause the assert.

With EA this assert was hit more times since EA added instances memory
slices which could create more complex memory graph.

Solution:
Use additional worklist for all visited mergemem nodes to avoid processing
them twice. The vectorset should_not_repeat and the assert were removed
since they duplicate the functionality of the new worklist.

--------------------------------------------------------------------------------------------
http://webrev.invokedynamic.info/kvn/6667573/index.html

Fixed 6667573: The method set_req_X() should not be used during Parse

Problem:
AddPNode::Ideal() uses set_req_X() to update inputs during
all phases when others Ideal() methods only use it for IGVN.
It cases a problem in EA during split unique types since
it removes nodes which wasn't fully constructed.

Solution:
Uses set_req_X() only for IGVN.

--------------------------------------------------------------------------------------------
http://awebrev.invokedynamic.info/kvn/6667580/index.html

Fixed 6667580: Optimize CmpP for allocations

Problem:
jvm2008 'serial' benchmark has code which calls String.equals(str1, str2)
for 2 strings produced by StringBuilder.toString(). The first check in String.equals()
could be optimized out since during the compilation due to inlining we know that
it compares 2 newly allocated strings.

Solution:
Optimize out CmpP if it compares new local objects or
a new local object and an input parameter.

--------------------------------------------------------------------------------------------
http://webrev.invokedynamic.info/kvn/6667581/index.html

Fixed 6667581: Don't generate initialization (by 0) code for arrays with size 0

Problem:
Some arrays are created with 0 size know during compilation.
We should avoid generation of initialization (by 0) code for such arrays.

Solution:
Don't generate initialization (by 0) code for arrays with size 0

--------------------------------------------------------------------------------------------
http://webrev.invokedynamic.info/kvn/6667588/index.html

Fixed 6667588: Don't generate duplicated CMP for float/double values

Problem:
C2 has optimization which replaces diamond graphs with CMove
(method PhaseIdealLoop::conditional_move()).
Each CMove instruction has own Cmp instruction to produce condition flags.
But float/double Cmp is expensive and it would be better to use a diamond graph
if we have more then one move.

Solution:
Don't generate float CMove instruction if there more then one move depending
on the condition.

--------------------------------------------------------------------------------------------
http://webrev.invokedynamic.info/kvn/6667595/index.html

Fixed 6667595: Set probability FAIR for pre-, post- loops and ALWAYS for main loop

Problem:
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.

Solution:
Set probability FAIR for pre-, post- loops and ALWAYS for zero-trip guard for main loop
assuming a main loop is executed always.

--------------------------------------------------------------------------------------------
http://webrev.invokedynamic.info/kvn/6667618/index.html

Fixed 6667618: Disable LoadL->ConvL2I ==> LoadI optimization

Problem:
LoadL->ConvL2I ==> LoadI optimization causes the problem for an object
initialization after InitializeNode was added in C2 since LoadI will not
match raw StoreL captured by InitializeNode. As result LoadI node could
be scheduled above the initialize StoreL node.

Solution:
1. Disable LoadL->ConvL2I ==> LoadI optimization.
2. Remove code in MemNode::Ideal_common() which allows a Load node
bypass initialize Store node aftermacro expansion of Initialize node.



More information about the hotspot-compiler-dev mailing list