Skip to content

Commit

Permalink
8322790: RISC-V: Tune costs for shuffles with no conversion
Browse files Browse the repository at this point in the history
Reviewed-by: rehn, fyang
  • Loading branch information
Ilya Gavrilin authored and Vladimir Kempik committed Jan 8, 2024
1 parent c8fa3e2 commit 2acb5bd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/hotspot/cpu/riscv/riscv.ad
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,7 @@ definitions %{
int_def LOAD_COST ( 300, 3 * DEFAULT_COST); // load, fpload
int_def STORE_COST ( 100, 1 * DEFAULT_COST); // store, fpstore
int_def XFER_COST ( 300, 3 * DEFAULT_COST); // mfc, mtc, fcvt, fmove, fcmp
int_def FMVX_COST ( 100, 1 * DEFAULT_COST); // shuffles with no conversion
int_def BRANCH_COST ( 200, 2 * DEFAULT_COST); // branch, jmp, call
int_def IMUL_COST ( 1000, 10 * DEFAULT_COST); // imul
int_def IDIVSI_COST ( 3400, 34 * DEFAULT_COST); // idivsi
Expand Down Expand Up @@ -8674,7 +8675,7 @@ instruct MoveF2I_reg_reg(iRegINoSp dst, fRegF src) %{

effect(DEF dst, USE src);

ins_cost(XFER_COST);
ins_cost(FMVX_COST);

format %{ "fmv.x.w $dst, $src\t#@MoveF2I_reg_reg" %}

Expand All @@ -8692,7 +8693,7 @@ instruct MoveI2F_reg_reg(fRegF dst, iRegI src) %{

effect(DEF dst, USE src);

ins_cost(XFER_COST);
ins_cost(FMVX_COST);

format %{ "fmv.w.x $dst, $src\t#@MoveI2F_reg_reg" %}

Expand All @@ -8710,7 +8711,7 @@ instruct MoveD2L_reg_reg(iRegLNoSp dst, fRegD src) %{

effect(DEF dst, USE src);

ins_cost(XFER_COST);
ins_cost(FMVX_COST);

format %{ "fmv.x.d $dst, $src\t#@MoveD2L_reg_reg" %}

Expand All @@ -8728,7 +8729,7 @@ instruct MoveL2D_reg_reg(fRegD dst, iRegL src) %{

effect(DEF dst, USE src);

ins_cost(XFER_COST);
ins_cost(FMVX_COST);

format %{ "fmv.d.x $dst, $src\t#@MoveL2D_reg_reg" %}

Expand Down

8 comments on commit 2acb5bd

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ilyagavrilin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk22u

@openjdk
Copy link

@openjdk openjdk bot commented on 2acb5bd Jan 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ilyagavrilin the backport was successfully created on the branch backport-Ilyagavrilin-2acb5bd9 in my personal fork of openjdk/jdk22u. To create a pull request with this backport targeting openjdk/jdk22u:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 2acb5bd9 from the openjdk/jdk repository.

The commit being backported was authored by Ilya Gavrilin on 8 Jan 2024 and was reviewed by Robbin Ehn and Fei Yang.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk22u:

$ git fetch https://github.com/openjdk-bots/jdk22u.git backport-Ilyagavrilin-2acb5bd9:backport-Ilyagavrilin-2acb5bd9
$ git checkout backport-Ilyagavrilin-2acb5bd9
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk22u.git backport-Ilyagavrilin-2acb5bd9

@Ilyagavrilin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk21u

@openjdk
Copy link

@openjdk openjdk bot commented on 2acb5bd Jan 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ilyagavrilin the backport was successfully created on the branch backport-Ilyagavrilin-2acb5bd9 in my personal fork of openjdk/jdk21u. To create a pull request with this backport targeting openjdk/jdk21u:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 2acb5bd9 from the openjdk/jdk repository.

The commit being backported was authored by Ilya Gavrilin on 8 Jan 2024 and was reviewed by Robbin Ehn and Fei Yang.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk21u:

$ git fetch https://github.com/openjdk-bots/jdk21u.git backport-Ilyagavrilin-2acb5bd9:backport-Ilyagavrilin-2acb5bd9
$ git checkout backport-Ilyagavrilin-2acb5bd9
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk21u.git backport-Ilyagavrilin-2acb5bd9

⚠️ @Ilyagavrilin You are not yet a collaborator in my fork openjdk-bots/jdk21u. An invite will be sent out and you need to accept it before you can proceed.

@Ilyagavrilin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk21u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 2acb5bd Feb 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ilyagavrilin the backport was successfully created on the branch backport-Ilyagavrilin-2acb5bd9 in my personal fork of openjdk/jdk21u-dev. To create a pull request with this backport targeting openjdk/jdk21u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 2acb5bd9 from the openjdk/jdk repository.

The commit being backported was authored by Ilya Gavrilin on 8 Jan 2024 and was reviewed by Robbin Ehn and Fei Yang.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk21u-dev:

$ git fetch https://github.com/openjdk-bots/jdk21u-dev.git backport-Ilyagavrilin-2acb5bd9:backport-Ilyagavrilin-2acb5bd9
$ git checkout backport-Ilyagavrilin-2acb5bd9
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk21u-dev.git backport-Ilyagavrilin-2acb5bd9

⚠️ @Ilyagavrilin You are not yet a collaborator in my fork openjdk-bots/jdk21u-dev. An invite will be sent out and you need to accept it before you can proceed.

@openjdk
Copy link

@openjdk openjdk bot commented on 2acb5bd Feb 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ilyagavrilin the backport was successfully created on the branch backport-Ilyagavrilin-2acb5bd9 in my personal fork of openjdk/jdk21u-dev. To create a pull request with this backport targeting openjdk/jdk21u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 2acb5bd9 from the openjdk/jdk repository.

The commit being backported was authored by Ilya Gavrilin on 8 Jan 2024 and was reviewed by Robbin Ehn and Fei Yang.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk21u-dev:

$ git fetch https://github.com/openjdk-bots/jdk21u-dev.git backport-Ilyagavrilin-2acb5bd9:backport-Ilyagavrilin-2acb5bd9
$ git checkout backport-Ilyagavrilin-2acb5bd9
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk21u-dev.git backport-Ilyagavrilin-2acb5bd9

⚠️ @Ilyagavrilin You are not yet a collaborator in my fork openjdk-bots/jdk21u-dev. An invite will be sent out and you need to accept it before you can proceed.

Please sign in to comment.