-
Notifications
You must be signed in to change notification settings - Fork 11.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[llvm-mca] Add -skip-unsupported-instructions option
Prior to this patch, if llvm-mca encountered an instruction which parses but has no scheduler info, the instruction is always reported as unsupported, and llvm-mca halts with an error. However, it would still be useful to allow MCA to continue even in the case of instructions lacking scheduling information. Obviously if scheduling information is lacking, it's not possible to give an accurate analysis for those instructions, and therefore a warning is emitted. A user could previously have worked around such unsupported instructions manually by deleting such instructions from the input, but this provides them a way of doing this for bulk inputs where they may not have a list of such unsupported instructions to drop up front. Note that this behaviour of instructions with no scheduling information under -skip-unsupported-instructions is analagous to current instructions which fail to parse: those are currently dropped from the input with a message printed, after which the analysis continues.
- Loading branch information
1 parent
f89f670
commit cd801c3
Showing
5 changed files
with
72 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
22 changes: 22 additions & 0 deletions
22
llvm/test/tools/llvm-mca/AArch64/Neoverse/V2-skip-unsupported-inst.s
This file contains 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 @@ | ||
# RUN: llvm-mca -march=aarch64 -mcpu=neoverse-v2 -skip-unsupported-instructions %s |& FileCheck --check-prefix=CHECK-SKIP %s | ||
# RUN: not llvm-mca -march=aarch64 -mcpu=neoverse-v2 %s |& FileCheck --check-prefix=CHECK-ERROR %s | ||
|
||
# CHECK-SKIP: warning: found an unsupported instruction in the input assembly sequence, skipping with -skip-unsupported-instructions, note accuracy will be impacted: | ||
# CHECK-ERROR: error: found an unsupported instruction in the input assembly sequence, use -skip-unsupported-instructions to ignore. | ||
|
||
# Currently lacks scheduling information and is therefore reported as unsupported by llvm-mca. | ||
# This may change some day in which case an alternative unsupported input would need to be found or the test removed. | ||
steor x0, [x1] | ||
|
||
# Supported instruction that may be analysed | ||
add x0, x0, x0 | ||
|
||
# CHECK-SKIP: Iterations: 100 | ||
# CHECK-SKIP: Instructions: 100 | ||
# CHECK-SKIP: Total Cycles: 103 | ||
# CHECK-SKIP: Total uOps: 100 | ||
|
||
# CHECK-SKIP: Dispatch Width: 16 | ||
# CHECK-SKIP: uOps Per Cycle: 0.97 | ||
# CHECK-SKIP: IPC: 0.97 | ||
# CHECK-SKIP: Block RThroughput: 0.2 |
6 changes: 0 additions & 6 deletions
6
llvm/test/tools/llvm-mca/X86/BtVer2/unsupported-instruction.s
This file was deleted.
Oops, something went wrong.
This file contains 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 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