[PATCH] D146303: [llvm-exegesis] Prevent llvm-exegesis from using unsupported opcodes

Pavel Kosov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 17 08:22:44 PDT 2023


kpdev42 created this revision.
kpdev42 added reviewers: tstellar, courbet, lebedev.ri.
kpdev42 added a project: LLVM.
Herald added subscribers: StephenFan, mstojanovic, kristof.beyls.
Herald added a project: All.
kpdev42 requested review of this revision.

When generating snippets for AArch64 with --opcode-index=-1, the code
generator asserts on opcodes that are not supported according to CPU
features.

The same assertion can be triggered even when generating a serial
snippet for a supported opcode if SERIAL_VIA_NON_MEMORY_INSTR execution
mode is used and an unsupported instruction is chosen as the "other
instruction". Unlike the first case, this one may result in flaky
failures because the other instruction is randomly chosen from the
instructions suitable for serializing execution.

This patch adjusts TableGen emitter for *GenInstrInfo.inc to make
possible to query for opcode availability instead of just asserting on
unsupported ones.

~~

Huawei RRI, OS Lab


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146303

Files:
  llvm/include/llvm/MC/MCInstrInfo.h
  llvm/tools/llvm-exegesis/lib/LlvmState.h
  llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp
  llvm/tools/llvm-exegesis/llvm-exegesis.cpp
  llvm/utils/TableGen/InstrInfoEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146303.506092.patch
Type: text/x-patch
Size: 7935 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230317/010c36f9/attachment.bin>


More information about the llvm-commits mailing list