RFR(M): 8038297 Avoid placing CTI immediately following cbcond instruction on T4
Igor Veresov
igor.veresov at oracle.com
Fri Apr 11 04:07:13 UTC 2014
Thanks, Chris!
igor
> On Apr 10, 2014, at 7:08 PM, Christian Thalinger <christian.thalinger at oracle.com> wrote:
>
> Looks good.
>
>> On Apr 10, 2014, at 3:48 PM, Igor Veresov <igor.veresov at oracle.com> wrote:
>>
>> Vladimir, thanks for the review!
>>
>> Here is the corrected webrev: http://cr.openjdk.java.net/~iveresov/8038297/webrev.01/
>>
>> Thanks!
>> igor
>>
>>> On Apr 10, 2014, at 2:29 PM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
>>>
>>> Igor,
>>>
>>> Please, clean up code style of if() in MachEpilogNode methods you touched in sparc.ad. The same in output_h.cpp.
>>>
>>> I think you should separate into 2 flags Flag_avoid_before and Flag_avoid_after:
>>>
>>> Flag_avoid_back_to_back = Flag_may_be_short_branch << 1, // Flag has two bits
>>>
>>> And use them instead of new MachNode::AvoidBackToBackFlag. I don't like next expression:
>>>
>>> ins_avoid_back_to_back() * Flag_avoid_back_to_back
>>>
>>> thanks,
>>> Vladimir
>>>
>>>> On 4/10/14 11:54 AM, Igor Veresov wrote:
>>>> We need to put nops between cbcond instructions and CTI instructions,
>>>> because otherwise it causes a pipeline flush.
>>>> This change extends the notion of the avoid_back_to_back instruction
>>>> attribute to hold a 2 bits flag, with bits being AVOID_BEFORE and
>>>> AVOID_AFTER. The meaning of the bits is that an instruction with the
>>>> AVOID_BEFORE flag cannot immediately follow one with AVOID_AFTER flag.
>>>> The assembler has been modified accordingly to ensure that we don’t have
>>>> a CTI instruction immediately following a cbcond instruction.
>>>>
>>>> Webrev: http://cr.openjdk.java.net/~iveresov/8038297/webrev.00/
>>>>
>>>> Testing: CTW, hotspot regression tests, JPRT
>>>>
>>>> There is a significant performance gain on the microbenchmark that
>>>> exposed the problem.
>>>> Before with -XX:+UseCBCond: 106.985ns
>>>> Before with -XX:-UseCBCond: 94.8967ns
>>>> After with -XX:+UseCBCond: 94.5262ns
>>>>
>>>>
>>>> Other performance results (some gains with jetstream and volano):
>>>> ==============================================================================
>>>> vanilla.logs:
>>>> Benchmark Samples Mean Stdev Geomean
>>>> Weight
>>>> reference_server 20 16136.35 107.24
>>>> jetstream 20 153.30 1.63 0.10
>>>> scimark 20 353.47 5.78 0.15
>>>> specjbb2000 20 220984.11 638.71 0.15
>>>> specjbb2005 20 287778.70 3987.52 0.25
>>>> specjvm98 20 295.09 1.41 0.15
>>>> volano25 20 224179.95 5213.65 0.20
>>>> ==============================================================================
>>>> hack1.logs:
>>>> Benchmark Samples Mean Stdev %Diff P
>>>> Significant
>>>> reference_server 20 16357.48 111.46 1.37 0.000
>>>> Yes
>>>> jetstream 20 160.82 2.07 4.90 0.000
>>>> Yes
>>>> scimark 20 351.65 5.53 -0.51 0.316
>>>> *
>>>> specjbb2000 20 221142.43 1247.38 0.07 0.617
>>>> *
>>>> specjbb2005 20 288196.75 4598.83 0.15 0.760
>>>> *
>>>> specjvm98 20 298.11 0.89 1.02 0.000
>>>> Yes
>>>> volano25 20 232848.15 3952.61 3.87 0.000
>>>> Yes
>>>> ==============================================================================
>
More information about the hotspot-compiler-dev
mailing list