-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[Exegesis][RISCV] Add RISCV support for llvm-exegesis #89047
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
92344af
[Exegesis][RISCV] Add RISCV support for llvm-exegesis
AnastasiyaChernikova 68bef56
Addressing review comments
AnastasiyaChernikova 22dc529
Addressing review comments
AnastasiyaChernikova 3050772
Addressing review comments
AnastasiyaChernikova 9c289b8
Fixed tests
AnastasiyaChernikova 1277beb
Addressing review comments
AnastasiyaChernikova 712aa9d
Addressing review comments
AnastasiyaChernikova 84db7eb
Addressing review comments
AnastasiyaChernikova 99bccdd
Addressing review comments
AnastasiyaChernikova 9352f6d
Addressing review comments
AnastasiyaChernikova d52ddc8
Addressing review comments
AnastasiyaChernikova 49cd463
Addressing review comments
AnastasiyaChernikova 4004b8a
Fix code format
AnastasiyaChernikova 5c2b1ad
Addressing review comments
AnastasiyaChernikova 321f049
Addressing review comments
AnastasiyaChernikova 78d6a0e
Addressing review comments
AnastasiyaChernikova a650063
Addressing review comments
AnastasiyaChernikova f35809b
Remove performance counters initial support
dybv-sc 6b6c0af
Addressing review comments
AnastasiyaChernikova c424403
Fix code format
AnastasiyaChernikova 68006e5
Addressing review comments
AnastasiyaChernikova 2fbe7b9
Fixed consequences of PR https://github.com/llvm/llvm-project/pull/11…
AnastasiyaChernikova e4fdd4b
Addressing review comments
AnastasiyaChernikova c2b189e
Addressing review comments
AnastasiyaChernikova f36c7e8
Addressing review comments
AnastasiyaChernikova eb3bd6f
Deleted processInstructionReservedRegs
AnastasiyaChernikova 70541d3
Addressing review comments
AnastasiyaChernikova 570fee5
Addressing review comments
AnastasiyaChernikova c56a94b
Addressing review comments
AnastasiyaChernikova a0130ea
Addressing review comments
AnastasiyaChernikova 9859fb6
Addressing review comments
AnastasiyaChernikova c84e814
Addressing review comments
AnastasiyaChernikova 2a82817
Addressing review comments
AnastasiyaChernikova File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
llvm/test/tools/llvm-exegesis/RISCV/latency-by-extension-A.s
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# RUN: llvm-exegesis -mode=latency -mtriple=riscv64-unknown-linux-gnu --mcpu=generic --benchmark-phase=assemble-measured-code -opcode-name=AMOAND_D -mattr="+a" | FileCheck --check-prefix=AMOAND_D %s | ||
|
||
AMOAND_D: --- | ||
AMOAND_D-NEXT: mode: latency | ||
AMOAND_D-NEXT: key: | ||
AMOAND_D-NEXT: instructions: | ||
AMOAND_D-NEXT: - 'AMOAND_D [[RE01:X[0-9]+]] X10 [[RE01:X[0-9]+]]' | ||
AMOAND_D-NEXT: config: '' | ||
AMOAND_D-NEXT: register_initial_values: | ||
AMOAND_D-NEXT: - '[[RE01:X[0-9]+]]=0x0' | ||
AMOAND_D-DAG: ... | ||
|
||
# RUN: llvm-exegesis -mode=latency -mtriple=riscv64-unknown-linux-gnu --mcpu=generic --benchmark-phase=assemble-measured-code -opcode-name=AMOADD_W -mattr="+a" | FileCheck --check-prefix=AMOADD_W %s | ||
|
||
AMOADD_W: --- | ||
AMOADD_W-NEXT: mode: latency | ||
AMOADD_W-NEXT: key: | ||
AMOADD_W-NEXT: instructions: | ||
AMOADD_W-NEXT: - 'AMOADD_W [[RE02:X[0-9]+]] X10 [[RE02:X[0-9]+]]' | ||
AMOADD_W-NEXT: config: '' | ||
AMOADD_W-NEXT: register_initial_values: | ||
AMOADD_W-NEXT: - '[[RE02:X[0-9]+]]=0x0' | ||
AMOADD_W-DAG: ... | ||
|
||
# RUN: llvm-exegesis -mode=latency -mtriple=riscv64-unknown-linux-gnu --mcpu=generic --benchmark-phase=assemble-measured-code -opcode-name=AMOMAXU_D -mattr="+a" | FileCheck --check-prefix=AMOMAXU_D %s | ||
|
||
AMOMAXU_D: --- | ||
AMOMAXU_D-NEXT: mode: latency | ||
AMOMAXU_D-NEXT: key: | ||
AMOMAXU_D-NEXT: instructions: | ||
AMOMAXU_D-NEXT: - 'AMOMAXU_D [[RE03:X[0-9]+]] X10 [[RE03:X[0-9]+]]' | ||
AMOMAXU_D-NEXT: config: '' | ||
AMOMAXU_D-NEXT: register_initial_values: | ||
AMOMAXU_D-NEXT: - '[[RE03:X[0-9]+]]=0x0' | ||
AMOMAXU_D-DAG: ... | ||
|
||
# RUN: llvm-exegesis -mode=latency -mtriple=riscv64-unknown-linux-gnu --mcpu=generic --benchmark-phase=assemble-measured-code -opcode-name=AMOMIN_W -mattr="+a" | FileCheck --check-prefix=AMOMIN_W %s | ||
|
||
AMOMIN_W: --- | ||
AMOMIN_W-NEXT: mode: latency | ||
AMOMIN_W-NEXT: key: | ||
AMOMIN_W-NEXT: instructions: | ||
AMOMIN_W-NEXT: - 'AMOMIN_W [[RE04:X[0-9]+]] X10 [[RE04:X[0-9]+]]' | ||
AMOMIN_W-NEXT: config: '' | ||
AMOMIN_W-NEXT: register_initial_values: | ||
AMOMIN_W-NEXT: - '[[RE04:X[0-9]+]]=0x0' | ||
AMOMIN_W-DAG: ... | ||
|
||
# RUN: llvm-exegesis -mode=latency -mtriple=riscv64-unknown-linux-gnu --mcpu=generic --benchmark-phase=assemble-measured-code -opcode-name=AMOXOR_D -mattr="+a" | FileCheck --check-prefix=AMOXOR_D %s | ||
|
||
AMOXOR_D: --- | ||
AMOXOR_D-NEXT: mode: latency | ||
AMOXOR_D-NEXT: key: | ||
AMOXOR_D-NEXT: instructions: | ||
AMOXOR_D-NEXT: - 'AMOXOR_D [[RE05:X[0-9]+]] X10 [[RE05:X[0-9]+]]' | ||
AMOXOR_D-NEXT: config: '' | ||
AMOXOR_D-NEXT: register_initial_values: | ||
AMOXOR_D-NEXT: - '[[RE05:X[0-9]+]]=0x0' | ||
AMOXOR_D-DAG: ... |
48 changes: 48 additions & 0 deletions
48
llvm/test/tools/llvm-exegesis/RISCV/latency-by-extension-C.s
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# RUN: llvm-exegesis -mode=latency -mtriple=riscv64-unknown-linux-gnu --mcpu=generic --benchmark-phase=assemble-measured-code -opcode-name=C_ADDI -mattr=+c | FileCheck --check-prefix=C_ADDI %s | ||
|
||
C_ADDI: --- | ||
C_ADDI-NEXT: mode: latency | ||
C_ADDI-NEXT: key: | ||
C_ADDI-NEXT: instructions: | ||
C_ADDI-NEXT: - 'C_ADDI [[REG01:X[0-9]+]] [[RE02:X[0-9]+]] [[IMM0:i_0x[0-9]+]]' | ||
|
||
# RUN: llvm-exegesis -mode=latency -mtriple=riscv64-unknown-linux-gnu --mcpu=generic --benchmark-phase=assemble-measured-code -opcode-name=C_ADDIW -mattr=+c | FileCheck --check-prefix=C_ADDIW %s | ||
|
||
C_ADDIW: --- | ||
C_ADDIW-NEXT: mode: latency | ||
C_ADDIW-NEXT: key: | ||
C_ADDIW-NEXT: instructions: | ||
C_ADDIW-NEXT: - 'C_ADDIW [[REG11:X[0-9]+]] [[RE12:X[0-9]+]] [[IMM1:i_0x[0-9]+]]' | ||
|
||
# RUN: llvm-exegesis -mode=latency -mtriple=riscv64-unknown-linux-gnu --mcpu=generic --benchmark-phase=assemble-measured-code -opcode-name=C_ANDI -mattr=+c | FileCheck --check-prefix=C_ANDI %s | ||
|
||
C_ANDI: --- | ||
C_ANDI-NEXT: mode: latency | ||
C_ANDI-NEXT: key: | ||
C_ANDI-NEXT: instructions: | ||
C_ANDI-NEXT: - 'C_ANDI [[REG31:X[0-9]+]] [[REG32:X[0-9]+]] [[IMM3:i_0x[0-9]+]]' | ||
|
||
# RUN: llvm-exegesis -mode=latency -mtriple=riscv64-unknown-linux-gnu --mcpu=generic --benchmark-phase=assemble-measured-code -opcode-name=C_SLLI -mattr=+c | FileCheck --check-prefix=C_SLLI %s | ||
|
||
C_SLLI: --- | ||
C_SLLI-NEXT: mode: latency | ||
C_SLLI-NEXT: key: | ||
C_SLLI-NEXT: instructions: | ||
C_SLLI-NEXT: - 'C_SLLI [[REG81:X[0-9]+]] [[REG82:X[0-9]+]] [[IMM8:i_0x[0-9]+]]' | ||
|
||
# RUN: llvm-exegesis -mode=latency -mtriple=riscv64-unknown-linux-gnu --mcpu=generic --benchmark-phase=assemble-measured-code -opcode-name=C_SRAI -mattr=+c | FileCheck --check-prefix=C_SRAI %s | ||
|
||
C_SRAI: --- | ||
C_SRAI-NEXT: mode: latency | ||
C_SRAI-NEXT: key: | ||
C_SRAI-NEXT: instructions: | ||
C_SRAI-NEXT: - 'C_SRAI [[REG91:X[0-9]+]] [[REG92:X[0-9]+]] [[IMM9:i_0x[0-9]+]]' | ||
|
||
# RUN: llvm-exegesis -mode=latency -mtriple=riscv64-unknown-linux-gnu --mcpu=generic --benchmark-phase=assemble-measured-code -opcode-name=C_SRLI -mattr=+c | FileCheck --check-prefix=C_SRLI %s | ||
|
||
C_SRLI: --- | ||
C_SRLI-NEXT: mode: latency | ||
C_SRLI-NEXT: key: | ||
C_SRLI-NEXT: instructions: | ||
C_SRLI-NEXT: - 'C_SRLI [[REG101:X[0-9]+]] [[REG102:X[0-9]+]] [[IMM10:i_0x[0-9]+]]' | ||
C_SRLI-DAG: ... |
11 changes: 11 additions & 0 deletions
11
llvm/test/tools/llvm-exegesis/RISCV/latency-by-opcode-name-FADD_D.s
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# RUN: llvm-exegesis -mtriple=riscv64-unknown-linux-gnu --mcpu=generic -mode=latency --benchmark-phase=assemble-measured-code -mattr=+d -opcode-name=FADD_D | FileCheck %s | ||
|
||
CHECK: --- | ||
CHECK-NEXT: mode: latency | ||
CHECK-NEXT: key: | ||
CHECK-NEXT: instructions: | ||
CHECK-NEXT: - 'FADD_D [[REG1:F[0-9]+_D]] [[REG2:F[0-9]+_D]] [[REG3:F[0-9]+_D]] i_0x7' | ||
CHECK-NEXT: config: '' | ||
CHECK-NEXT: register_initial_values: | ||
CHECK-DAG: - '[[REG1]]=0x0' | ||
CHECK-DAG: ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
include_directories( | ||
${LLVM_MAIN_SRC_DIR}/lib/Target/RISCV | ||
${LLVM_BINARY_DIR}/lib/Target/RISCV | ||
) | ||
|
||
set(LLVM_LINK_COMPONENTS | ||
CodeGen | ||
RISCV | ||
Exegesis | ||
Core | ||
Support | ||
) | ||
|
||
add_llvm_library(LLVMExegesisRISCV | ||
DISABLE_LLVM_LINK_LLVM_DYLIB | ||
STATIC | ||
Target.cpp | ||
|
||
DEPENDS | ||
intrinsics_gen | ||
RISCVCommonTableGen | ||
) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.