RFR: 8294366: RISC-V: Partially mark out incompressible regions [v2]
Xiaolin Zheng
xlinzheng at openjdk.org
Sat Oct 8 16:00:00 UTC 2022
On Sat, 8 Oct 2022 04:57:05 GMT, Fei Yang <fyang at openjdk.org> wrote:
>> Xiaolin Zheng has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 10 additional commits since the last revision:
>>
>> - Plural form
>> - comment polishment
>> - patchable nop's code style
>> - Merge remote-tracking branch 'github-openjdk/master' into riscv-rvc-checkin-first-half-part
>> - Merge remote-tracking branch 'github-openjdk/master' into riscv-rvc-checkin-first-half-part
>> - [5] RVC: IncompressibleRegions for patchable labels
>> - [4] RVC: IncompressibleRegions for fixed length code slices
>> - [3] RVC: IncompressibleRegions for patchable nops
>> - [2] RVC: Disable auto transformations for branch instructions
>> - [1] RVC: Add the IncompressibleRegion
>
> Updated change looks good. Thanks.
Thank @RealFYang and @yadongw for taking the time to review this!
Tests on QEMU seem okay.
An integration first so that it won't be blocked by myself.
> src/hotspot/cpu/riscv/assembler_riscv.hpp line 2113:
>
>> 2111: //
>> 2112: // 4. Using -XX:PrintAssemblyOptions=no-aliases could distinguish RVC instructions from
>> 2113: // normal ones.
>
> One more suggestion for this code comment:
>
> // ========================================
> // RISC-V Compressed Instructions Extension
> // ========================================
> // Note:
> // 1. Assembler functions encoding 16-bit compressed instructions always begin with a 'c_'
> // prefix, such as 'c_add'. Correspondingly, assembler functions encoding normal 32-bit
> // instructions with begin with a '_' prefix, such as "_add". Most of time users have no
> // need to explicitly emit these compressed instructions. Instead, they still use unified
> // wrappers such as 'add' which do the compressing work through 'c_add' depending on the
> // the operands of the instruction and availability of the RVC hardware extension.
> //
> // 2. 'CompressibleRegion' and 'IncompressibleRegion' are introduced to mark assembler scopes
> // within which instructions are qualified or unqualified to be compressed into their 16-bit
> // versions. An example:
> //
> // CompressibleRegion cr(_masm);
> // __ add(...); // this instruction will be compressed into 'c.and' when possible
> // {
> // IncompressibleRegion ir(_masm);
> // __ add(...); // this instruction will not be compressed
> // {
> // CompressibleRegion cr(_masm);
> // __ add(...); // this instruction will be compressed into 'c.and' when possible
> // }
> // }
> //
> // 3. When printing JIT assembly code, using -XX:PrintAssemblyOptions=no-aliases could help
> // distinguish compressed 16-bit instructions from normal 32-bit ones.
Thanks for the polish and it looks more concise than before. The other one, the code style of nop is fixed as well.
-------------
PR: https://git.openjdk.org/jdk/pull/10421
More information about the hotspot-dev
mailing list