-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[llvm-exegesis][AArch64] Disable pauth and ldgm as unsupported instructions #132346
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
Changes from 8 commits
f1e1d7a
5039c2b
6b81e65
bef8e21
dade502
b6ce448
783f86d
70eb3bf
a1fedb4
06fbe30
3af87a0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # REQUIRES: aarch64-registered-target | ||
|
|
||
| # Check for skipping of illegal instruction errors (AUT and LDGM) | ||
| # RUN: llvm-exegesis -mcpu=neoverse-v2 -mode=latency --opcode-name=AUTIA --benchmark-phase=assemble-measured-code 2>&1 | FileCheck %s --check-prefix=CHECK-AUTIA | ||
| # CHECK-AUTIA-NOT: snippet crashed while running: Illegal instruction | ||
|
|
||
| # RUN: llvm-exegesis -mcpu=neoverse-v2 -mode=latency --opcode-name=LDGM --benchmark-phase=assemble-measured-code 2>&1 | FileCheck %s --check-prefix=CHECK-LDGM | ||
| # CHECK-LDGM: LDGM: Unsupported opcode: load tag multiple |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,12 +39,18 @@ const char * | |
| ExegesisTarget::getIgnoredOpcodeReasonOrNull(const LLVMState &State, | ||
| unsigned Opcode) const { | ||
| const MCInstrDesc &InstrDesc = State.getIC().getInstr(Opcode).Description; | ||
| if (InstrDesc.isPseudo() || InstrDesc.usesCustomInsertionHook()) | ||
| return "Unsupported opcode: isPseudo/usesCustomInserter"; | ||
| if (InstrDesc.isBranch() || InstrDesc.isIndirectBranch()) | ||
| return "Unsupported opcode: isBranch/isIndirectBranch"; | ||
| if (InstrDesc.isCall() || InstrDesc.isReturn()) | ||
| return "Unsupported opcode: isCall/isReturn"; | ||
| if (InstrDesc.isPseudo()) | ||
|
||
| return "Unsupported opcode: isPseudo"; | ||
| if (InstrDesc.usesCustomInsertionHook()) | ||
| return "Unsupported opcode: usesCustomInserter"; | ||
| if (InstrDesc.isBranch()) | ||
| return "Unsupported opcode: isBranch"; | ||
| if (InstrDesc.isIndirectBranch()) | ||
| return "Unsupported opcode: isIndirectBranch"; | ||
| if (InstrDesc.isCall()) | ||
| return "Unsupported opcode: isCall"; | ||
| if (InstrDesc.isReturn()) | ||
| return "Unsupported opcode: isReturn"; | ||
| return nullptr; | ||
| } | ||
|
|
||
|
|
@@ -113,9 +119,8 @@ ExegesisTarget::createBenchmarkRunner( | |
| case Benchmark::InverseThroughput: | ||
| if (BenchmarkPhaseSelector == BenchmarkPhaseSelectorE::Measure && | ||
| !PfmCounters.CycleCounter) { | ||
| const char *ModeName = Mode == Benchmark::Latency | ||
| ? "latency" | ||
| : "inverse_throughput"; | ||
| const char *ModeName = | ||
| Mode == Benchmark::Latency ? "latency" : "inverse_throughput"; | ||
| return make_error<Failure>( | ||
| Twine("can't run '") | ||
| .concat(ModeName) | ||
|
|
@@ -148,7 +153,8 @@ std::unique_ptr<SnippetGenerator> ExegesisTarget::createSerialSnippetGenerator( | |
| return std::make_unique<SerialSnippetGenerator>(State, Opts); | ||
| } | ||
|
|
||
| std::unique_ptr<SnippetGenerator> ExegesisTarget::createParallelSnippetGenerator( | ||
| std::unique_ptr<SnippetGenerator> | ||
| ExegesisTarget::createParallelSnippetGenerator( | ||
| const LLVMState &State, const SnippetGenerator::Options &Opts) const { | ||
| return std::make_unique<ParallelSnippetGenerator>(State, Opts); | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -268,8 +268,7 @@ class ExegesisTarget { | |
|
|
||
| // Creates a snippet generator for the given mode. | ||
| std::unique_ptr<SnippetGenerator> | ||
| createSnippetGenerator(Benchmark::ModeE Mode, | ||
| const LLVMState &State, | ||
| createSnippetGenerator(Benchmark::ModeE Mode, const LLVMState &State, | ||
|
||
| const SnippetGenerator::Options &Opts) const; | ||
| // Creates a benchmark runner for the given mode. | ||
| Expected<std::unique_ptr<BenchmarkRunner>> createBenchmarkRunner( | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -281,7 +281,7 @@ static cl::opt<std::string> MAttr( | |
| static ExitOnError ExitOnErr("llvm-exegesis error: "); | ||
|
|
||
| // Helper function that logs the error(s) and exits. | ||
| template <typename... ArgTs> static void ExitWithError(ArgTs &&... Args) { | ||
| template <typename... ArgTs> static void ExitWithError(ArgTs &&...Args) { | ||
|
||
| ExitOnErr(make_error<Failure>(std::forward<ArgTs>(Args)...)); | ||
| } | ||
|
|
||
|
|
@@ -444,8 +444,7 @@ static void runBenchmarkConfigurations( | |
| Benchmark &Result = AllResults.front(); | ||
|
|
||
| // If any of our measurements failed, pretend they all have failed. | ||
| if (AllResults.size() > 1 && | ||
| any_of(AllResults, [](const Benchmark &R) { | ||
| if (AllResults.size() > 1 && any_of(AllResults, [](const Benchmark &R) { | ||
| return R.Measurements.empty(); | ||
| })) | ||
| Result.Measurements.clear(); | ||
|
|
@@ -505,7 +504,6 @@ void benchmarkMain() { | |
| if (!Runner) { | ||
| ExitWithError("cannot create benchmark runner"); | ||
| } | ||
|
|
||
| const auto Opcodes = getOpcodesOrDie(State); | ||
| std::vector<BenchmarkCode> Configurations; | ||
|
|
||
|
|
@@ -643,8 +641,7 @@ static void analysisMain() { | |
| errorOrToExpected(MemoryBuffer::getFile(BenchmarkFile, /*IsText=*/true))); | ||
|
|
||
| const auto TriplesAndCpus = ExitOnFileError( | ||
| BenchmarkFile, | ||
| Benchmark::readTriplesAndCpusFromYamls(*MemoryBuffer)); | ||
| BenchmarkFile, Benchmark::readTriplesAndCpusFromYamls(*MemoryBuffer)); | ||
| if (TriplesAndCpus.empty()) { | ||
| errs() << "no benchmarks to analyze\n"; | ||
| return; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.