> Extend MOVK-based scheme to MOVK/MOVZ allowing to store 19 bits of metadata 
> directly. Where metadata does not fit into one MOVK/MOVZ, for C2-compiled 
> code attempt storing it after the main code and refer to the location via 18 
> bits of offset value stored within MOVN.
> 
> The measurements have been run on Arm Neoverse V2 CPU.
> 
> Each workload has been run in 20 interleaved pairs of the baseline and the 
> patched versions. Order of the configurations in each pair was chosen 
> randomly. Each of these runs has been run as one JMH fork with 30 warm-up 
> iterations and 30 measurement iterations. Only the final score reported by 
> JMH has been considered a data point, while all per-iteration measurement 
> results were ignored.
> 
> In order to reduce impact on performance comparison from possible profile 
> differences, the same AOT-cached profile was used in each run of the same 
> workload. Each AOT-cached profile was collected using a training run with 100 
> warm-up iterations and 100 measurement iterations.
> 
> The values in the tables are geometric means across all pairs for the same 
> workload. Positive values indicate improvements.
> 
> The * symbol marks performance measurements which, based on additional 
> analysis, appear to be statistically significant.
> 
> The ~ symbol marks workloads with performance behaviour that appears to be 
> multi-modal.
> 
>   |     Workload      | Performance |
>   | ----------------- | -------------- |
>   | JmhAkkaUct        |   +0.189%   |
>   | JmhAls            |   +0.580%   |
>   | JmhChiSquare      |   +0.458%   |
>   | JmhDbShootout     |   +0.937%   |
>   | JmhDecTree        | * +0.493%   |
>   | JmhDotty          |   +0.267%   |
>   | JmhFinagleChirper |   +0.471%   |
>   | JmhFinagleHttp    |   +1.067%   |
>   | JmhFjKmeans       |   -0.023%   |
>   | JmhFutureGenetic  | ~ +4.047%   |
>   | JmhGaussMix       |   -2.929%   |
>   | JmhLogRegression  | * +0.534%   |
>   | JmhMnemonics      |   -0.092%   |
>   | JmhMovieLens      |   +2.595%   |
>   | JmhNaiveBayes     | * +1.249%   |
>   | JmhNeo4jAnalytics |   +1.136%   |
>   | JmhPageRank       |   +0.471%   |
>   | JmhParMnemonics   |   -0.379%   |
>   | JmhPhilosophers   |   -1.045%   |
>   | JmhReactors       |   -0.029%   |
>   | JmhRxScrabble     |   +0.170%   |
>   | JmhScalaDoku      | ~ +3.930%   |
>   | JmhScalaKmeans    | ~ +1.952%   |
>   | JmhScalaStmBench7 | * +0.714%   |
>   | JmhScrabble       |   -0.081%   |
> 
> ---------
> 
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Ruben Ayrapetyan has updated the pull request with a new target base due to a 
merge or a rebase. The pull request now contains five commits:

 - Address review comments
 - Merge from mainline
 - Revert "8373696: AArch64: C1: Embed FP constants into the main code"
   
   This reverts commit df380b25e9d4417869b4344b129439ec5a557a3e.
 - 8373696: AArch64: Refine post-call NOPs
   
   Extend MOVK-based scheme to MOVK/MOVZ allowing to store 19 bits
   of metadata.
   
   Choose number of metadata slots in post-call NOP sequence between 1
   and 2 depending on the offset from the CodeBlob header.
   
   Additionally, implement ADR/ADRP-based metadata storage - that
   provides 22 bits instead of 16 bits to store metadata. This can
   be enabled via UsePostCallSequenceWithADRP option.
 - 8373696: AArch64: C1: Embed FP constants into the main code
   
   The constants section for C1 on AArch64 is only used for fp32/fp64
   constants. Embed the values into the instruction section like for
   the integers.
   
   Use immediates where it doesn't require more memory than would have
   been with the constants section. This is always the case for fp32.
   Otherwise, use LDR + B skip_label + <int64>.
   
   This removes the constants section - saving memory which otherwise
   would be used for padding to align the entry point to CodeEntryAlignment.
   
   Also, this enables further potential optimizations that require size of
   the constants section to be known before code is emitted.

-------------

Changes: https://git.openjdk.org/jdk/pull/28855/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28855&range=01
  Stats: 342 lines in 9 files changed: 301 ins; 10 del; 31 mod
  Patch: https://git.openjdk.org/jdk/pull/28855.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28855/head:pull/28855

PR: https://git.openjdk.org/jdk/pull/28855

Reply via email to