United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7063629 use cbcond in C2 generated code on T4
JDK-7063629 : use cbcond in C2 generated code on T4

Details
Type:
Enhancement
Submit Date:
2011-07-07
Status:
Closed
Updated Date:
2014-03-25
Project Name:
JDK
Resolved Date:
2011-09-30
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
sparc
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs22
Fixed Versions:
hs22 (b02)

Related Reports
Backport:
Backport:
Cloners:
Relates:
Relates:
Relates:
Relates:
Relates:

Sub Tasks

Description
T4 has new short branch instruction without delay slot. Use it in C2 generated code.

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/95134e034042
                                     
2011-08-12
PUBLIC COMMENTS

Added new fused compare and branch instructions into sparc.ad and corresponding short versions which use cbcond instruction. Added new flag avoid_back_to_back to avoid generation of cbcond back to back.

Split shorten_branches() into 2 methods. First method conservatively estimates code size and branches location and does few rounds of branch shortening. It is executed before ScheduleAndBundle(). Step 3 is moved to new method shorten_branches_final() called after ScheduleAndBundle(). It does final paddings, alignment and final branch replacement. Method fill_buffer() does verification instead of padding.

Labels are binded now only during code generation in fill_buffer(). As result they are not available when forward branches are emitted. To fix that MacroAssembler branch instructions are used now in x86 .ad files. I replaced unused rtype parameter with maybe_short flag to force using only long branches in .ad long branch instructions.

Added check to adlc to verify that short version of a branch instructions has the same declaration in .ad file.

Added assert to verify that the size of emitted instruction matches the value returned by MachNode::size(). Found that MachBreakpointNode::size() returned incorrect value on x64.

Fixed loop alignment for Sparc (min alignment should be instruction size which is 4 bytes instead of 1 byte).

The prototype was done by Tom and I took some of his additional fixes. The block changes go with some code in output to put opto assembly style block comments in the PrintNMethods output. There's also snippet in there that deals with the fact kill projections on branches make it appear the kill occurs after the branch instead of being part of it.
                                     
2011-08-12
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/95134e034042
                                     
2011-08-23
EVALUATION

See main CR
                                     
2011-09-12



Hardware and Software, Engineered to Work Together