JDK-6954029 : Improve implicit null check generration with COOP
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris
  • CPU: sparc
  • Submitted: 2010-05-19
  • Updated: 2010-09-24
  • Resolved: 2010-06-26
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.
JDK 6 JDK 7 Other
6u21pFixed 7Fixed hs19Fixed
Description
When DecodeN instruction does not fold into address expression (Sparc) it may prevent implicit null check generation if it scheduled below the null check since the corresponding memory instruction could not be moved (first case):

064   B5: #	B26 B6 <- B4  Freq: 0.858868
064 + 	LDUW   [R_I0 + #16],R_L1	! int ! Field java/lang/String.offset
068 + 	LDUW   [R_I0 + #12],R_I0	! compressed ptr ! Field java/lang/String.value
06c + 	LDUW   [R_I1 + #16],R_L7	! int ! Field java/lang/String.offset
070 + 	CMP    R_I0,narrowoop: NULL	! compressed ptr
074   	LDUW   [R_I1 + #12],R_I1	! compressed ptr ! Field java/lang/String.value
078   	BPeq   ccr,B26  P=0.000001 C=-1.000000
078   	ADD    R_L1,R_I2,R_L1
078
080   B6: #	B26 B7 <- B5  Freq: 0.858867
080 + 	decode_heap_oop_not_null R_I0, R_G1
088 + 	ADD    R_L1,R_L2,R_L4
08c   	ADD    R_L7,R_L2,R_L5
090   	LDUW   [R_G1 + #12],R_L3	! range
094 + 	ADD    R_L4,#-1,R_G3
098   	decode_heap_oop_not_null R_I1, R_G5
0a0 + 	CMP    R_L1,R_L3	! unsigned
0a4   	BPuge  icc_U,B26  P=0.000001 C=-1.000000
0a4   	ADD    R_L5,#-1,R_G4
0a4
0ac   B7: #	B26 B8 <- B6  Freq: 0.858866
0ac + 	CMP    R_G3,R_L3	! unsigned
0b0   	BPuge  icc_U,B26  P=0.000001 C=-1.000000
0b0
0b8   B8: #	B26 B9 <- B7  Freq: 0.858865
0b8   	LDUW   [R_G5 + #12],R_L0	! range
0bc   	NullCheck R_G5
0bc

Comments
PUBLIC COMMENTS When DecodeN instruction can not fold into address expression it may prevent implicit null check generation if it is scheduled below the null check since the corresponding memory instruction could not be moved. Solution: If needed move DecodeN instruction above null check to generate implicit null check. I also removed code which switch off default COOP usage on N1: currently generated COOP code perform better on N1 (tested jbb2005).
02-06-2010

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/3657cb01ffc5
02-06-2010