RFR: 8309978: [x64] Fix useless padding [v2]
Vladimir Kozlov
kvn at openjdk.org
Wed Jun 14 16:40:00 UTC 2023
> Fixed typo in `IntelJccErratum::compute_padding()`.
>
> Due to the typo (`mach` instead of `next`) useless padding could be generated because size of `mach` instruction (which is `cmp` in this case and big) counted twice. As result combined size most likely cross 32-bytes cache line boundary and padding is generated to avoid that.
>
>
> 030 B2: # out( B4 B3 ) <- in( B1 ) Freq: 0.999999
> nop # 16 bytes pad for loops and calls
> 040 cmpb [R12 + R10 << 3 + #144] (compressed oop addressing), #42
> 049 jle,s B4 P=0.667944 C=6785.000000
>
> Note: only some x86 CPUs are [affected](https://github.com/openjdk/jdk/blob/ba837b4bfa2dea85653d8a8fccd0817a569b4378/src/hotspot/cpu/x86/vm_version_x86.cpp#L1957).
>
> For new IR test to work I moved `PHASE_FINAL_CODE` IR print inside `PhaseOutput` scope because padding nodes (`NOP` mach nodes) are present only in this phase IR.
>
> Added new IR test. Tested tier1-3, xcomp, stress.
Vladimir Kozlov has updated the pull request incrementally with one additional commit since the last revision:
Address Christian comments
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/14461/files
- new: https://git.openjdk.org/jdk/pull/14461/files/5c711eff..a70193c2
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=14461&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=14461&range=00-01
Stats: 6 lines in 1 file changed: 0 ins; 3 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/14461.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/14461/head:pull/14461
PR: https://git.openjdk.org/jdk/pull/14461
More information about the hotspot-compiler-dev
mailing list