RFR: 8278114: New addnode ideal optimization: converting "x + x" into "x << 1" [v6]
Claes Redestad
redestad at openjdk.java.net
Fri Dec 17 23:55:27 UTC 2021
On Fri, 17 Dec 2021 22:18:06 GMT, Zhiqiang Zang <duke at openjdk.java.net> wrote:
>> A new ideal optimization can be introduced for addnode: converting "x + x" into "x << 1".
>>
>>
>> // Convert "x + x" into "x << 1"
>> if (in1 == in2) {
>> return new LShiftINode(in1, phase->intcon(1));
>> }
>
> Zhiqiang Zang has updated the pull request incrementally with one additional commit since the last revision:
>
> rename the ir test.
test/micro/org/openjdk/bench/vm/compiler/AddIdeal_XPlusX_LShiftC.java line 49:
> 47: @Warmup(iterations = 20, time = 1, timeUnit = TimeUnit.SECONDS)
> 48: @Measurement(iterations = 20, time = 1, timeUnit = TimeUnit.SECONDS)
> 49: @Fork(value = 3 , jvmArgsAppend = {"-XX:-TieredCompilation"})
Is `-TieredCompilation` necessary to demonstrate an effect? Settings that are not strictly necessary - such as tuning - should generally be avoided (someone might want to set up separate runs with `TieredCompilation` enabled and disabled on a higher level, for example)
-------------
PR: https://git.openjdk.java.net/jdk/pull/6675
More information about the hotspot-compiler-dev
mailing list